Forum Discussion
Theo_Alex
2 years agoRegular Visitor
Difference between two entries
Hi ya’ll, I have a problem regarding my data model and its calculation. I have a data model which is organized in rows. Quite similar to an OLAP/Cube. Each User and Entry gets an ID. Also eac...
- 2 years ago
Hi Theo_Alex ,
You can try below measure.
Last Entry = CALCULATE( SUM('Table'[Score]), OFFSET( -1, ALL('Table'[User_ID],'Table'[Score_ID],'Table'[Entry_ID],'Table'[Entry_Date]), ORDERBY('Table'[Entry_Date],ASC), PARTITIONBY('Table'[User_ID],'Table'[Score_ID]) ) )Demo - 5-31calculate Difference between two entries.pbix
Did I answer your question? If yes, pls mark my post as a solution and appreciate your Kudos !
Thank you~
xifeng_L
Super User
2 years agoHi Theo_Alex
Can you be more specific about the examples of computational logic, such as 2-4 = -2, where the 2 is obtained and the 4 is obtained?
So for instance for User_id = 1
The Delta of Score_ID 1 would be 2 – 4 = -2
The Delta of Score_ID 2 would be 0 – 5 = -5
And what is your expected result, a new calculated column or using a matrix to display it? If a matrix, what are the dimensions?