Follow

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use
Contact

Cumulative values in Power BI

I’m trying to use the following code to calculate the cumulative sum in Power BI:

cumulative = CALCULATE(SUM(test[Number]),ALL('test'),test[Date] <= MAX(test[Date]))

However, as you can see in the picture, the result is summing up everything and not by cumulative per date.

I did some research, and apparently, the formula is not wrong.

MEDevel.com: Open-source for Healthcare and Education

Collecting and validating open-source software for healthcare, education, enterprise, development, medical imaging, medical records, and digital pathology.

Visit Medevel

strong text

>Solution :

Try this.

cumulative = 

VAR d = test[Date] 

RETURN CALCULATE(SUM(test[Number]),ALL('test'),test[Date] <=d)
Add a comment

Leave a Reply

Keep Up to Date with the Most Important News

By pressing the Subscribe button, you confirm that you have read and are agreeing to our Privacy Policy and Terms of Use

Discover more from Dev solutions

Subscribe now to keep reading and get access to the full archive.

Continue reading