Forum Discussion
SSS
Helper I
8 years agoDifference between consecutive values in a Measure
Good Afternoon, I need help with an issue regarding the difference between two consecutive values in a Measure. I've made a measure that allows me to SUM the values of number of operations fo...
- 8 years ago
Try this
Cumulative= IF ( HASONEVALUE ( Consulta1[Date] ), SUMX ( FILTER ( ALL ( Consulta1[Date] ), Consulta1[Date] <= VALUES ( Consulta1[Date] ) && MONTH ( Consulta1[Date] ) = MONTH ( VALUES ( Consulta1[Date] ) ) ), [Difference] ) )
Zubair_Muhammad
Community Champion
8 years ago
Now create this one
Cumulative=
IF (
HASONEVALUE ( Consulta1[Date] ),
SUMX (
FILTER (
ALL ( Consulta1[Date] ),
Consulta1[Date] <= VALUES ( Consulta1[Date] )
),
[Difference]
)
)SSS
Helper I
8 years agoThanks Zubair_Muhammad, your solution works!!
Could I ask if it is possible to add one last issue? I would like the cumulative sum to reset each month, it is possible?
Thanks!
- Zubair_Muhammad8 years ago
Community Champion
- SSS8 years ago
Helper I
- Zubair_Muhammad8 years ago
Community Champion
Try this
Cumulative= IF ( HASONEVALUE ( Consulta1[Date] ), SUMX ( FILTER ( ALL ( Consulta1[Date] ), Consulta1[Date] <= VALUES ( Consulta1[Date] ) && MONTH ( Consulta1[Date] ) = MONTH ( VALUES ( Consulta1[Date] ) ) ), [Difference] ) )