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
FMD89
Frequent Visitor

Show difference across rows in a query

Hi,

 

I have a data set that will be updated weekly. The format is basically;

 

Week Entity A Entity B Entity C 
13/07/2022 500 900 1000 
20/07/2022 200 800 1000 
27/07/2022    

 

I would like to add a measure that will show the difference per week for each entity when the table is updated to contain a value.

 

So Entity A would show a 300 value for 20/07 for example

 

I am struggling to get this to work using calculated columns or measures from resarching the forum if someone could assist?

 

Thank you

1 ACCEPTED SOLUTION
Ashish_Mathur
Super User
Super User

Hi,

Download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

View solution in original post

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Download my PBI file from here.

Hope this helps.

Untitled.png


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
lbendlin
Super User
Super User

That should be relatively straightforward.  For each cell in your visual you grab the current date, then you calculate the largest date that is smaller than the current date, and then you retrieve the column value for that penultimate date.  You meant to say -300, right?

 

lbendlin_0-1658546821344.png

 

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.