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
Justas4478
Post Prodigy
Post Prodigy

Fixing start date in a cumulative measure

Hello, I am trying to create cumulative sales measure for my bi report but I am runing in to problem. Since my measure should only start caculating sales starting from 2021,06,01 - to date. I i keep getting error when trying to add specific date in to measure. would anyone know how to modify the measure? Thanks.

Cumulative Sales volume =
CALCULATE (
'Actuals'[Sales Volume],
FILTER (
ALLSELECTED ( 'Date' ),
DATE(2021,06,01) <= MAX ( 'Date'[Date] )
)))
1 ACCEPTED SOLUTION

@Justas4478 , Sorry, I got that part wrong. Check if this can help

 

Cumulative Sales volume =

var _min = date(2021,06,01)

return
CALCULATE (
'Actuals'[Sales Volume],
FILTER (
ALLSELECTED ( 'Date' ),
'Date'[Date]<= MAX ( 'Date'[Date] ) && 'Date'[Date]>= _min
))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@Justas4478 , Assume you have date in Actual Table

 

Cumulative Sales volume =

var _min = minx(allselected('Actual'), 'Actual'[Date])

return
CALCULATE (
'Actuals'[Sales Volume],
FILTER (
ALLSELECTED ( 'Date' ),
 'Date'[Date]<= MAX ( 'Date'[Date] ) && 'Date'[Date]>= _min
))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak I does work. But sorry for stupid question where do I declate in a measure that  cumulative calculation should only read data starting from 2021,06,01 even if the table goes further back.

this is result with the sulution that you provided. I attached screenshot I hope it explains it well. Please send any questions if anything is unclear.

cumlative sale.PNG

@Justas4478 , Sorry, I got that part wrong. Check if this can help

 

Cumulative Sales volume =

var _min = date(2021,06,01)

return
CALCULATE (
'Actuals'[Sales Volume],
FILTER (
ALLSELECTED ( 'Date' ),
'Date'[Date]<= MAX ( 'Date'[Date] ) && 'Date'[Date]>= _min
))

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

@amitchandak It looks to be working well now. Thank you so much for help.

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!

November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

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.