Forum Discussion
Calculate Row Difference between two consecutive rows based on two consecutive rows & other columns
Hi Amir851 ,
Maybe you can do like this:
rows_diff =
CALCULATE(
SUM([R_total]),
FILTER(
'Sales (3)',
[Run_all] = EARLIER([Run_all]) + 1
)
)
But, pay attention, my [R_total], [Run_all] , [rows_diff] are all calculated column.
I tried to do it by measures, but don't get it.
Hope the result is what you want.
Best regards,
Lionel Chen
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Amir8516 years agoHelper I
Dear v-lionel-msft ,
Thank you for your response.
Actually , I know how to implement the above scenario with calculated columns. But in my current requirement all the columns except description are measures. I want to implement the above scenario using measures only.
Can you please let me know whether is there any possibilities to implement the above scenario by considering all those columns as measures.
Thanks
Amir
- v-lionel-msft6 years agoCommunity Support
Hi Amir851 ,
I did initially plan to use measure to do this, but I found it impossible.
Measure and column are not arbitrary. They have different return values, so they use different functions.
Here's an article about measure and column:
https://docs.microsoft.com/en-us/dax/dax-overview
Best regargs,
Lionel Chen