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
Anonymous
Not applicable

Running totals Column

Hello everyone,

I am trying to create a 'year to Date' columns calculating the cummulative value from the colum [Value]. However, as you can see in the picture below, the measure is repeting the same value and not adding the value over time. Note that my date range is in a weekly basis (column week date)... maybe it could be a issue to use this measure. Also I have tryied to use the TotalYTD function and the result is the same as shown in the 'Year To Date' column. Any Idea on how to fix this DAX? 

 

JulioYYC_0-1670878860590.png

Thansk!

1 ACCEPTED SOLUTION
v-xiaosun-msft
Community Support
Community Support

Hi @Anonymous ,

 

I made a sample and here is my solution,

You can create a calculated column as below to return your expected output.

Column =
CALCULATE (
    SUM ( 'Table'[value] ),
    FILTER ( 'Table', 'Table'[week date] <= EARLIER ( 'Table'[week date] ) )
)

Final output:

vxiaosunmsft_0-1670923811169.png

Best Regards,
Community Support Team _ xiaosun

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
Mahesh0016
Super User
Super User

cumulative Sales = CALCULATE (
    SUM ( 'Table'[Sales] ),
    FILTER ( ALL('Table'), 'Table'[Date] <= MAX ( 'Table'[Date] ) )
)
Hello @Anonymous ,
You should try this formula...... if it is really useful for you kindly accept as solutions.
thank you!
v-xiaosun-msft
Community Support
Community Support

Hi @Anonymous ,

 

I made a sample and here is my solution,

You can create a calculated column as below to return your expected output.

Column =
CALCULATE (
    SUM ( 'Table'[value] ),
    FILTER ( 'Table', 'Table'[week date] <= EARLIER ( 'Table'[week date] ) )
)

Final output:

vxiaosunmsft_0-1670923811169.png

Best Regards,
Community Support Team _ xiaosun

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Anonymous
Not applicable

Thank you, it worked perfectly! 

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.