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
Anonymous
Not applicable

Subtracting random rows in a table on a filter condition

I have a table, with following structure. Last column prices Diff is what I would like to extract . The table consists of multiple Source , The prices are captured from Source either in Actual Values or in differential. Source "A" is the base line, Source "B" Price should be reflected as difference from Source "A " e.g. For Month "A" = Month" B" , Price Diff should be , Price "A" - Price "B". prices for Source " C" since already available as differntial should get populated from Price column as is. Is it possible to achieve this using Subtraction function between rows in same table. Thanks fpr your help in advance 

 

Source PriceMonth Price Diff 
A32Jul-2032
A34Aug-2034
A36.5Sep-2036.5
A38.3Oct-2038.3
B33Aug-201
B32Sep-204.5
B37Oct-201.3
B32.5Nov-20-32.5
C0.23Jul-200.23
C2.35Aug-202.35
C-2.34Sep-20-2.34

 

 

1 ACCEPTED SOLUTION
dax
Community Support
Community Support

Hi @Anonymous , 

You could refer to my sample for details.

Best Regards,
Zoe Zhi

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

View solution in original post

2 REPLIES 2
dax
Community Support
Community Support

Hi @Anonymous , 

You could refer to my sample for details.

Best Regards,
Zoe Zhi

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

Anonymous
Not applicable

Hi @dax, Zoe, Many thanks for your help. It worked just fine.

However, I have a question, I noticed that you used Two Tables . The difference is extracted as a measure in Table (2) , so is there specific reason that you have summarized data in another table Table 2. 

 

This could be too much to ask but if you could explain the measure that you have used. I wonder how you are moving between differnt rows , there isnt a counter used nor an index .

 

Thanks Again 

 

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.

Top Solution Authors