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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
james44452
Frequent Visitor

Cumulative values on graph where date slicer doesn't recalculate cumulative value

Hi,

I have a line graph with cumulative revenue over time using the following measures:

 

Cumulative revenue =
CALCULATE(
    [Revenue by date],
    FILTER(
        ALLSELECTED('calendar'[Date]),
        ISONORAFTER('calendar'[Date], MAX('calendar'[Date]), DESC)
    )
)
This measure uses the measures below:
 
Revenue = SUM('Project financials'[Value])
 
Revenue by date =
    CALCULATE([Revenue],
    USERELATIONSHIP('calendar'[Date], 'Project financials'[Date])
)
 
Some dummy data in my Project Financials table looks like this:
ProjectDateValue
Project x1 Jan 22£10k
Project x1 Feb 22£50k
Project x1 Mar 22£100k
Project y1 Jan 22£80k
Project y1 Feb 22£150k
Project y1 Mar 22£160k
 
When I plot this in a line graph the cumulative value recalculates based on the start date chosen in the date slicer. However, I need it to always calculate cumulative revenue from the start of the project and the date slicer just changes which period we're looking at. So, let's say a project began in January 2022, the cumulative revenue by January 2023 was £1m and the cumulative revenue at January 2024 was £2m. If the date slicer was set with a start date of January 2023 this should still lead to my cumulative measure giving the cumulative value at January 2023 as £1m.
 
1 ACCEPTED SOLUTION

You were looking for the zoom slider.

lbendlin_0-1709689653989.png

 

 

View solution in original post

6 REPLIES 6
james44452
Frequent Visitor

Apologies for note being clearer. The link below to a simple pbi file with fake data shows what I have currently. The issue I have is that if I move the date slicer to 01/03/2023 the cumulative value for March resets to March's value and ignores the values in January and February. The png file (link below) has a black line drawn on it which shows how it should look when the slicer is moved to 01/03/2023.

 

Example pbix 

Mark up of graph 

 

I can't just create a cumulative column in any of the tables either as the real dashboard uses some measures that draw from various tables to create a total.

 

I hope that makes things clearer.

 

Many thanks,

James

The link asks for access. Please check.

Sorry Ibendlin. I have changed the settings of the files and the links should work for you now.

 

Many thanks

 

James

You were looking for the zoom slider.

lbendlin_0-1709689653989.png

 

 

Thank you and I didn't realise that it would be so simple!

lbendlin
Super User
Super User

Your explanation is not clear to me.

 

Please provide sample data that covers your issue or question completely.

Do not include sensitive information or anything not related to the issue or question.

If you are unsure how to upload data please refer to https://community.fabric.microsoft.com/t5/Community-Blog/How-to-provide-sample-data-in-the-Power-BI-...

Please show the expected outcome based on the sample data you provided.

Want faster answers? https://community.fabric.microsoft.com/t5/Desktop/How-to-Get-Your-Question-Answered-Quickly/m-p/1447...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.