cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

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
Community Support
Community Support

Hi @prisharm , 

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
Community Support
Community Support

Hi @prisharm , 

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

Frequent Visitor

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
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Microsoft Ignite

Microsoft Ignite with Arun Ulag

Featured Session: Drive Data Culture with Power BI- Vision, Strategy & Roadmap. Register here https://myignite.microsoft.com #MSIgnite #PowerPlatform #Power BI ​

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors