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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Month Slicer not working for Running Total

I am trying to calculate the running total of a set of measures by months in my matrix. The running total is working by itself, however when used with my monthly slicer it breaks. I want it to calculate up to the month selected in the slicer, but instead it filters for that specific month.

example: when I select May I want to see running total froo every month from Jan to May but it shows me data only in the month of May.
Running Total = CALCULATE
                             ( SUM ( Table[column] ),
                                FILTER ( ALLSELECTED( Table ),
                                  Table[columnDate] <= MAX ( Table[ColumnDate] ) ) )

The Month Slicer comes from Table[ColumnDate].Month

2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

Here's my approach:

  1. Create a Calendar Table and write calculated column formulas to extract Year, Month Name and Month Number.  Using the Month number column, use the "Sort By" column feature to ensure that the Month Names are sorted
  2. Create a relationship from the ColumnDate field of the Table to the Date column of the Calendar Table
  3. Create 2 slicers - one each for Month Name and Year.  Select 2020 and May in those slicers
  4. Write these measures

Total = SUM(Table[Column])

Total YTD = CALCULATE([Total],DATESYTD(Calendar[Date],"31/12"))

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Greg_Deckler
Community Champion
Community Champion

Perhaps:

Running Total = CALCULATE
                             ( SUM ( Table[column] ),
                                FILTER ( ALLEXCEPT( Table[ColumnDate ),
                                  Table[columnDate] <= MAX ( Table[ColumnDate] ) ) )



Follow on LinkedIn
@ 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!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.