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

Cumulative value of a measure based on date slicer value

Hi there,

 

I am using the following measure to equally distribute a value between a project's start and end date:

 

distributed_results = CALCULATE(SUMX(FILTER(Projects,Projects[begin]<=max(Calendar[Date]) && Projects[end]>=MIN(Calendar[Date])),(Projects[distributed_value])),CROSSFILTER(Projects[begin],Calendar[Date],None))

 

The filtering is based on the year value of a date slicer.

 

Now,  I would like to display a cumulative value in the graph for this exact calculation. So far, I've tried the following:

 

cumulative = calculate([distributed_results],FILTER(all(Calendar[Date].[Year])Calendar[Date].[Year]>=SELECTEDVALUE(Calendar[Date].[Year])),FILTER(all(Calendar[Date]), Calendar[Date] <= max(Calendar[Date])))

However, I do get the wrong values and I do not know where they come from.

 

How can I get the cumulative value for the first measure based on the value of my date slicer?

 

Thank you very much for your help!

8 REPLIES 8
amitchandak
Super User
Super User

@Anonymous , refer if the attached after signature can help

 

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

@amitchandak Thanks for the file. Unfortunately not the thing, I was looking for.


I used the measure I mentioned to distribute values between a start and an end date (as you did in the file). Now, I need a monthly running total based on that measure. This should also be based on the year selected in a date slicer.

 

I hope you get what I'd like to accomplish.

Anonymous
Not applicable

HI @Anonymous,

I'd like to recommend you to take a look at below blog if its scenarios meet your requirement:

Before You Post, Read This  

Regards,

Xiaoxin Sheng

Anonymous
Not applicable

@Anonymous Thanks for the message. I've had a look at it before I posted but nothing really helps in my case.

 

I made a simplified pbix file so that you can see what I am trying to achieve. Since I think that I am not able to post it on here, I uploaded the file to https://we.tl/t-dPScxy8xA2

 

I do have a measure that displays a certain value between the start and end date of a project. Now, I need a monthly running total but all I get is the following:

 

Bildschirmfoto 2020-06-22 um 08.36.15.png

 Instead, e.g. February should show 90 and March 170 for the running total (right column).

 

Could someone please have a look at the code? I would highly appreciate your help.

 

Maybe @amitchandak could help me with that as well.

 

 

@Anonymous , file is empty

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

Anonymous
Not applicable

@amitchandak Unfortunately, I cannot see any attachments. Could you send it again, please? Thank you!

Check now

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

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.

Top Solution Authors