Forum Discussion
Cumulative sum calculated field
Hi claudirnava ,
Maybe I think you can try this DAX code.
Cumulative MAT =
CALCULATE(
SUM('YourTableName'[MAT]),
FILTER(
ALLSELECTED('YourTableName'),
'YourTableName'[Participación Total] >= MIN('YourTableName'[Participación Total])
)
)
This measure will calculate the running total of “MAT” for each row, considering all previous rows with a higher or equal value of “Participación Total”.
If it does not help you, you can provide more details and .pbix file for me.
Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
Hello Yilong
The problem that I have is that the measure [MAT] is a calculated field is not part of the table, so I tried to calculate a cummulative sum of a calculated field. This is the expression that I used to calculated the MAT:
- Anonymous2 years agoNot applicable
Hi claudirnava ,
I think you can change your DAX code.
Cumulative Participacion Total = CALCULATE( SUMX( FILTER( ALLSELECTED(calendario[Date]), calendario[Date] <= MAX(calendario[Date]) ), [Participacion Total] ) )Best Regards
Yilong Zhou
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.