Forum Discussion
How can I calculate absolute difference between two consecutive numbers in a column
The approach would probably be to make a calculated column (referred to as index-column), which assigns a value from 1 to n amount of rows, and then make another calculated column to get the value for index-column - 1. Does that make sense?
Best,
Martin
- v-huizhn-msft9 years agoMicrosoft Employee
Hi niharika0913,
Please try to add a rank column based on slicers. More details, please review the solution here. And you'd better share your resource table and list expected result, or your .pbix file. So that we can provide the solution which is close to your requirement.
Best Regards,
Angelia - Anonymous9 years agoNot applicable
I understand. So, either, it has to be a dynamic index-column, or some sort of hierarchy-index-colum, so we can apply that -1 method. I've tried to figure out a smarter way to do it, but I can't come up with any DAX formula, which will solve your problem. Will let you know, if I come up with anything.