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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
Lisipowerbi
New Member

Being able to create cumulative totals bar graph without changing dataset

Hi everyone,

 

I am trying to create a bar graph where every month the data is cumulative, currently I manage to have a monthly total but I would like to have it add on afterwards:

Screenshot 2024-05-02 at 16.18.53.png

Where October shows total for October but than November shows total for October + November. 

 

Can anyone help how to do this? 

 

These are my current settings:

Screenshot 2024-05-02 at 16.25.12.png

4 REPLIES 4
Lisipowerbi
New Member

@Greg_Deckler 

I actually managed to do the running total using CALCULATE - my issue now is that I need this for a given time range only. Showing you an example below:

Screenshot 2024-05-06 at 15.51.15.png

 I would like the running total to only start calculating when needed (managed to simply do this using a fitler on the visual for the actual count) but I don't know how to add this date range filter to my CALCULATE function:

Running Total FY1 = CALCULATE(SUM('sheet (2)'[# of events]), FILTER(ALL('sheet (2)'), 'sheet (2)'[CreatedDate].[Date]<= MAX('sheet (2)'[CreatedDate].[Date])))
 
Any advice?

@Lisipowerbi Well, in theory:

Running Total FY1 = CALCULATE(SUM('sheet (2)'[# of events]), FILTER(ALL('sheet (2)'), 'sheet (2)'[CreatedDate].[Date] >= DATE( 2023, 10, 1) && 'sheet (2)'[CreatedDate].[Date]<= MAX('sheet (2)'[CreatedDate].[Date])))

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Thanks this works but I would need to only show until "Today" if possible. I tried this:

 

Running Total FY = CALCULATE(SUM('spotmecom-analytics-powerbi-handler (2)'[# of events]), FILTER(ALL('spotmecom-analytics-powerbi-handler (2)'), 'spotmecom-analytics-powerbi-handler (2)'[CreatedDate].[Date]>=DATE(2023,10,1) && 'spotmecom-analytics-powerbi-handler (2)'[CreatedDate].[Date]<=TODAY() && 'spotmecom-analytics-powerbi-handler (2)'[CreatedDate].[Date]<=MAX('spotmecom-analytics-powerbi-handler (2)'[CreatedDate].[Date]))) 


But the visualization still takes the end of the year into consideration - would you happen to know why? 

Thank you for all your help!!

Screenshot 2024-05-07 at 11.04.26.png

@Greg_Deckler

Greg_Deckler
Super User
Super User

@Lisipowerbi Better Running Total - Microsoft Fabric Community


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors
Top Kudoed Authors