Forum Discussion
SSS
8 years agoHelper I
Difference 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
8 years agoCommunity Champion
Try these measures
First Create this Measure
Difference =
VAR Followingday =
NEXTDAY ( Consulta1[Date] )
RETURN
[Medida]
- CALCULATE (
[Medida],
FILTER ( ALL ( Consulta1 ), Consulta1[Date] = Followingday )
)- Zubair_Muhammad8 years agoCommunity Champion
Now create this one
Cumulative= IF ( HASONEVALUE ( Consulta1[Date] ), SUMX ( FILTER ( ALL ( Consulta1[Date] ), Consulta1[Date] <= VALUES ( Consulta1[Date] ) ), [Difference] ) )- SSS8 years agoHelper I
Thanks 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 agoCommunity Champion