Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
jay_patel
Helper IV
Helper IV

Cumulative Sum

"I want cumulative sum of values based on different countries , here is the dataset and the dax I written. The cumulative sum of each country is 100. Suppose I have 2 countries "AL" and "NL". The cumulative sum of "AL" would be 100 and same would be for "NL". The result from the DAX i have written gives me 200 for "NL". The cumulative sum for "AL" ends on 100, so for "NL" it starts from 100. I just want to start it from "0" for "NL"."FOR "AL"FOR "AL"FOR "NL"FOR "NL"

1 ACCEPTED SOLUTION
ImkeF
Community Champion
Community Champion

Hi @jay_patel ,
country code must just be equal ("=")and not less than equal ("<="):

 

image.png

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

View solution in original post

1 REPLY 1
ImkeF
Community Champion
Community Champion

Hi @jay_patel ,
country code must just be equal ("=")and not less than equal ("<="):

 

image.png

Imke Feldmann (The BIccountant)

If you liked my solution, please give it a thumbs up. And if I did answer your question, please mark this post as a solution. Thanks!

How to integrate M-code into your solution -- How to get your questions answered quickly -- How to provide sample data -- Check out more PBI- learning resources here -- Performance Tipps for M-queries

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.