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

Calculating the diference from a value to a previous row in function of an id and date

Dear Team,

 

I would like to be able to calculate the following difference column, it seems that it's a hard nut to crack.

 

IDDATEREADINGDifference
A1/10/20192313
A30/09/2019105
A26/09/201950
B5/08/20195024
B3/08/2019266
B2/06/20192020
C1/09/20196727
C6/08/20194017
C1/01/20192323

Everything is very welcome,

 

Greatly appreciated

3 REPLIES 3
v-diye-msft
Community Support
Community Support

Hi @Anonymous 

 

Sorry, I don't understand the calculation logic, could you please specify more? Does the difference column is the expected results? how does it count? 

If you'd like to count the difference in adjacent rows, the output seems incorrect.

 23-10=13

10-5=5

5-50=0????

50-26=24

26-20=6

20-67=20???

67-40=27

40-23=17

23-0=23

 

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
Anonymous
Not applicable

Dear @Anonymous 

You can create a column which calculates the previous READING using date/period and calculate the difference between those two columns.

 

Regards, 

Munna 

Anonymous
Not applicable

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.