Forum Discussion
Cumulative Sum is not working as expected
- 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
Hi Anonymous
Try this measure.
CumulativeTotal =
VAR _date = MAX ( DimDate[Date] )
RETURN
CALCULATE (
SUM ( 'F/Unrealeased_PO'[OpenPODelValue_USD] ),
ALL ( 'F/Unrealeased_PO'[PO Due Date] ),
'F/Unrealeased_PO'[PO Due Date] <= _date
) + 0
Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.
- Anonymous4 years agoNot applicable
Hi v-jingzhang thanks for your solution but still its not working for me. Can you please give any other solution.
- v-jingzhang4 years ago
Community Support
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
- Anonymous4 years agoNot applicable
Hey v-jingzhang thank you very much for your solution. It's working as per my requirement. Thanks alot..