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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Brannon
Regular Visitor

Cumulative Measure in Line Graph works, but not with date hierarchy

I have a cumulative measure, and when I have the chart broken down to weeks the measure works as expected, but when rolling up to months my cumulative line continues to the end of the date field. Everything is calculating correctly, I just am not getting the actual cumulative line to stop at the data date.

 

By week:

Brannon_0-1675352803227.png

 

 

By Month:

Brannon_1-1675353641044.png

 

 

 

 

Here is the dax I am using:

Actual Cumulative =
IF(selectedvalue(Dates[Merged])<=(LASTDATE('Curr Data'[Data Date])-6),
CALCULATE (
SUMX ( filter('Curr Data','Curr Data'[Spreadsheet Field] = "Actual Units" || 'Curr Data'[Spreadsheet Field] = "Period Actual Units"),'Curr Data'[Value] ),
FILTER (
ALL(Dates[Merged]),
(Dates[Merged]<= max(Dates[Merged]))
))
)
 
 
Thanks for any help you folks may have.
 
Brannon
1 ACCEPTED SOLUTION
johnt75
Super User
Super User

Try changing SELECTEDVALUE to MAX. SELECTEDVALUE will return blank if multiple dates are visible in the filter context, and blank evaluates as less than any date.

View solution in original post

2 REPLIES 2
Brannon
Regular Visitor

THANK YOU! I've been searching all over for a solution for that, MAX worked. 

johnt75
Super User
Super User

Try changing SELECTEDVALUE to MAX. SELECTEDVALUE will return blank if multiple dates are visible in the filter context, and blank evaluates as less than any date.

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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.