Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
rishtin
Frequent Visitor

Finding Matching value within the same column

Hello,

I have a dataset with a column Amount that has positive and negative $ amounts for transactions. I want to take each negative amount and find its equavalent positive amount and mark both of these transactions. I can't wrap my head around the logic. Some help would be appreciated.

 

Here's the type of dataset that i have. I would like to mark both TrxID 101 and 102 as "Matched" or something in a separate calculated column.

TrxIDDeptVendorAmount
101D123V00992.25
102D123V009-92.25
103D124V00923.22

 

thanks

4 REPLIES 4
v-jayw-msft
Community Support
Community Support

Hi @rishtin ,

 

What if the amount of ID 103 is 92.25 or -92.25? All three rows get matched?

 

Best Regards,

Jay

 

Community Support Team _ Jay Wang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

@v-jayw-msftit is possible to have a matching number in a different department but we will be looking for matching values for the same vendor in the same department.

amitchandak
Super User
Super User

@rishtin 

Make sure you have id column or

create a index column

https://stackoverflow.com/questions/45715963/creating-an-index-column-for-power-bi

Get the same index positive value

Same index = max(filter(table, abs(table[value]) =earlier(table[value]) && table[value]<0),table[index])

 

You can add conditions like

&& table[account_no] =earlier(table[account_no]) 

 

Greg_Deckler
Super User
Super User

Please see this post regarding How to Get Your Question Answered Quickly: https://community.powerbi.com/t5/Community-Blog/How-to-Get-Your-Question-Answered-Quickly/ba-p/38490


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.