Forum Discussion
Anonymous
4 years agoNot applicable
Cumulative Sum is not working as expected
Hi All, 1. I have written a mesure like below to get the cumulative sum 2. Its working as expected when no field is added in the columns section like below 3. But my ...
- 4 years ago
Hi Anonymous
Add a Date table to your model and connect it to 'F/Unrealeased_PO' table on date columns. Then use Year and Month columns from Date table into the matrix as Rows fields. Then use below measure. I create a sample pbix for your reference.
CumulativeTotal = VAR _date = MAX ( DimDate[Date] ) RETURN CALCULATE ( SUM ( 'Table'[Total Purchase] ), ALL ( DimDate[Date] ), DimDate[Date] <= _date ) + 0Best regards,
Jing
v-jingzhang
Community Support
4 years agoHi Anonymous
Add a Date table to your model and connect it to 'F/Unrealeased_PO' table on date columns. Then use Year and Month columns from Date table into the matrix as Rows fields. Then use below measure. I create a sample pbix for your reference.
CumulativeTotal =
VAR _date = MAX ( DimDate[Date] )
RETURN
CALCULATE (
SUM ( 'Table'[Total Purchase] ),
ALL ( DimDate[Date] ),
DimDate[Date] <= _date
) + 0
Best regards,
Jing
Anonymous
4 years agoNot applicable
Hey v-jingzhang thank you very much for your solution. It's working as per my requirement. Thanks alot..