Forum Discussion
claudirnava
2 years agoFrequent Visitor
Cumulative sum calculated field
Hello I want to create a cumulative sum but the ammount that I´m intended to use is a calculated field. I´m not wokinr with date because I just want to sum the ammounts once they are sorted in de...
claudirnava
2 years agoFrequent Visitor
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:
MAT = CALCULATE(
SUM( 'Consumos Onco'[Measure Values] ),
DATESINPERIOD( calendario[Date] , MAX( calendario[Date] ) , -12 , MONTH )
)
And I want to crate the cummulate sum of "Participacion Total" this is the expression:
Participacion Total = DIVIDE([MAT],
CALCULATE (
SUM ( 'Consumos Onco'[Measure Values] ),
FILTER ( ALL ( 'Consumos Onco' ), [Measure Names] = "Consumo" ),DATESINPERIOD( calendario[Date] , MAX( calendario[Date] ) , -12 , MONTH )
))
The proble is that I dont know how to calcualte a cummulative sum of a calculated field