cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
diskman
Regular Visitor

DAX - Running Total on measure by month index (column)

Hi

 

I have a dynamic table "table" (created by SUMMARIZE function based on other table) with fields:

  • "MonthIndex" - column
  • "MonthName" - column
  • "Forecast%" - measure which depends on some slicer and switch statements

 

 

table = 
SUMMARIZE (
    'Calendar New',
    'Calendar New'[Month],
    'Calendar New'[MonthIndex]
    )

 

 

 

 

I am trying to set up a running total "x" of "Forecast%" by "MonthIndex" but the runing total does not work - see screenshot.

 

x = CALCULATE (      
   'table'[Forecast%],      
   FILTER (      
      ALL ( 'table'[MonthIndex] ),      
      'table'[MonthIndex] <= MAX ( 'table'[MonthIndex] )  
   )    
)  

 

2021-10-25_18h05_10.png

 

Looking for any ideas

 

regards

1 ACCEPTED SOLUTION

@smpa01this has worked for me

 x = 
    SUMX(
        FILTER(
            ALL('table'),
            'table'[MonthIndex] <= MAX ( 'table'[MonthIndex] )
        ),
        'table'[Forecast%]
    )

View solution in original post

5 REPLIES 5
smpa01
Super User
Super User

@diskman  any chance you can provide a sample pbix?





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






New Animated Dashboard: Sales Calendar


diskman
Regular Visitor

@smpa01sorry the pbix has commercial data related 😞

@diskman  How did you write 

[Forecast%]




Did I answer your question? Mark my post as a solution!

Proud to be a Super User!






New Animated Dashboard: Sales Calendar


diskman
Regular Visitor

@smpa01  it is as below ... AFAIK It must use the measure because there is visual slicer used "Preference %" for measure calculation

Forecast % = (IF(MIN('table'[MonthIndex])=1,'Preference %'[Preference % Value], (33-'Preference %'[Preference % Value])/11))/100
 

@smpa01this has worked for me

 x = 
    SUMX(
        FILTER(
            ALL('table'),
            'table'[MonthIndex] <= MAX ( 'table'[MonthIndex] )
        ),
        'table'[Forecast%]
    )

View solution in original post

Helpful resources

Announcements
UG GA Amplification 768x460.png

Launching new user group features

Learn how to create your own user groups today!

November Power BI Update 768x460.png

Check it Out!

Click here to read more about the November 2021 Updates!

M365 768x460.jpg

Microsoft 365 Collaboration Conference | December 7–9, 2021

Join us, in-person, December 7–9 in Las Vegas, for the largest gathering of the Microsoft community in the world.