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
mybarbie9917_LI
Frequent Visitor

Cumulative Sum of Another Measure

I have a small task that I find hard to accomplish as I always find DAX so difficult. I need to create measure to calculate the cumulative sum of another measure. For example, 

mybarbie9917_LI_1-1699509682234.png

 

mybarbie9917_LI_0-1699509658582.png

The column Cumulative Sum of "Sales Check" is what I am looking for, so I can tell November is the 6th month in the 2009 year that had the cumulative sales greater than $25M. I hope someone can please show me a solution. 

 

mybarbie9917_LI_2-1699509727855.png

 

Sample File 

1 ACCEPTED SOLUTION
Dangar332
Super User
Super User

hi, @mybarbie9917_LI 

try below

sales cumulative =
     calculate(
        sumx('tablename',[sales check]),
        filter(
           all('d_date'),
           'd_date'[month]<= max('d_date'[month])&&
            d_date'[year]=max(d_date'[year])
        )
     )

View solution in original post

3 REPLIES 3
Dangar332
Super User
Super User

hi, @mybarbie9917_LI 

try below

sales cumulative =
     calculate(
        sumx('tablename',[sales check]),
        filter(
           all('d_date'),
           'd_date'[month]<= max('d_date'[month])&&
            d_date'[year]=max(d_date'[year])
        )
     )
Dangar332
Super User
Super User

HI, @mybarbie9917_LI 

if you want to use MEASURE  inside sum use sumx() instead of sum()
try below

sales cumulative =
     calculate(
        sumx('tablename',[sales amount]),
        filter(
           all('d_date'),
           'd_date'[Date]< max('d_date'[Date])
        )
     )

Thanks for your reply, but it is not exactly what I am looking for. I already have the Sales Cumulative measure. I want to have measure that can do the cumulative sum from the result of the measure Sales Check. 

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.

Users online (2,009)