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

Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM. Register now.

Reply

Calculate difference in consecutive rows while applying filters from relational tables

Hi there,

 

I was recently helped with a query on about calculating the difference between consecutive rows - which helped a lot when all the data had already been aggragated. 

 

I would like to calculate the difference between consecutive rows, but taking into consideration the data that is being used from the reference table as a means to filter the data. 

 

Capture3.JPG

 

I have come up with calculations, but the results from when I filter the data based on the reference table are incorrect. 

 

I would really appreciate the assistance / input on this. 

 

Kind regards,

1 ACCEPTED SOLUTION
v-juanli-msft
Community Support
Community Support

Hi @PowerEnthusiast 

I can reproduce your table by adding "business unit" and "entity unit" from reference table into Account table in the table visual

8.png

Please open my pbix to check my test fits your scenario.

If so, i can go on next step.

 

Best Regards
Maggie

View solution in original post

4 REPLIES 4
v-juanli-msft
Community Support
Community Support

Hi @PowerEnthusiast 

I can reproduce your table by adding "business unit" and "entity unit" from reference table into Account table in the table visual

8.png

Please open my pbix to check my test fits your scenario.

If so, i can go on next step.

 

Best Regards
Maggie

@v-juanli-msft  Yes, this works :). 

The only thing is that the first index (index 0) and last index (index 5) should have the actual value and no the difference. So index 0 is correct with the value of 100, but index 5 should have a value of 800. 

Hi @PowerEnthusiast 

Is this problem sloved? 

If it is sloved, could you kindly accept it as a solution to close this case?

If not, please let me know.

 

Best Regards

Maggie

Hi Maggie.

Thank you for the assistance. I just accepted it as a solution. 

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.