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

Need help to create calculated measure for cumulative sum

I am trying to create calculated measure for cumulative sum for below values.

This could be achieved easily using measure, but i need calculated column as measure cant be added to x axis.

Capture.PNG

From above sample data, i need Cumulative Sum for each person for selected period using calculated column.

So if i select person A and date till november i should get below result.

Capture2.PNG

 

Later For each cumulative sum for selected period, i need count of persons for selected period in graph.

i.e., if i select period as 1st oct to 30th oct, graph should show sum of cumulative points till 30th oct vs number of persons.

Need calculated column not calculated measure.

How can this be achieved? Waiting for the replies as it is critical.

 

 

2 REPLIES 2
mattbrice
Solution Sage
Solution Sage

You seem to have diverging goals.  Calculated columns are computed at data refresh time, not at run time so if you want cumulative to be dynamic, you'll need a measure not a Calculated column. 

 

Put another way, with a Calculated Column you need to decide on cumulative total while writing the function, which means it is hard coded.  Cumulative won't change based on slicer or filter selections in a visual.

And a measure is just:

measure =
CALCULATE (
    SUM ( Table[Points] ),
    FILTER ( ALL ( Calendar[Date] ), Calendar[Date] <= MAX ( Calendar[Date] ) )
)

 

And instead of putting "Points" in the rows, i'd use a measure for that as well 

 

sum Point = SUM ( Table[Points] )

otherwise it will impact my cumulative measure above.

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.