Forum Discussion
Anonymous
3 years agoNot applicable
how to calculate cumulative decrease use DAX
Hi, experts, I want to get the gap of the relevant value, for example, the "cal" column in the picture, do you have any solutions?
- 3 years ago
VAR PreviousRow = CALCULATE( [Orders], OFFSET( -1, ALLSELECTED('Product'[yearmonth]), ORDERBY('Product'[yearmonth], ASC) ) )
RETURN [# Orders] - PreviousRow
Hello Anonymous ,
I hope this helpful for you if not so can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
Mahesh0016
Super User
3 years agoVAR PreviousRow = CALCULATE( [Orders], OFFSET( -1, ALLSELECTED('Product'[yearmonth]), ORDERBY('Product'[yearmonth], ASC) ) )
RETURN [# Orders] - PreviousRow
Hello Anonymous ,
I hope this helpful for you if not so can you share sample data and sample output in table format? Or a sample pbix after removing sensitive data.
sivasrao
Helper III
3 years agoHi,
What is the [Order] in the above function?