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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ribisht17
Community Champion
Community Champion

Running Total not working as expected

Hello Datafam,

 

@amitchandak 

 

I have the below scenario where I need to calculate RUNNING total,

 

It not giving me the exact output as I was looking for

 

ribisht17_0-1700101571099.png

 

See the Yellow part showing the wrong running total

ribisht17_1-1700101756268.png

 

 

I am using this DAX function,

 

Count Certification Active running total in Cert Calendar Date =
CALCULATE(
    sum('Master Certification Tab'[Certification Count_C]),
    FILTER(
        ALLSELECTED('Certification Calendar Date'[Cert Calendar Date]),
        ISONORAFTER('Certification Calendar Date'[Cert Calendar Date], MIN('Certification Calendar Date'[Cert Calendar Date]), desc)
    )
)
 
No sure about the issue with this DAX, I am using calendar dates here
 
Let me know if you need more info
 
Regards,
Ritesh

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@ribisht17 , Make sure that Year, Qtr, and month are from the 'Certification Calendar Date' and it not a from a Auto date hierarchy , There should be columns from 'Certification Calendar Date' 

 

 

few version

 

CALCULATE(
sum('Master Certification Tab'[Certification Count_C]),
FILTER(
ALLSELECTED('Certification Calendar Date'[Cert Calendar Date]),
'Certification Calendar Date'[Cert Calendar Date]<= Max('Certification Calendar Date'[Cert Calendar Date])
)
)

 


CALCULATE(
sum('Master Certification Tab'[Certification Count_C]),
FILTER(
all('Certification Calendar Date'[Cert Calendar Date]),
'Certification Calendar Date'[Cert Calendar Date]<= Max('Certification Calendar Date'[Cert Calendar Date])
)
)

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

View solution in original post

2 REPLIES 2
ribisht17
Community Champion
Community Champion

Thanks much Amit, looks like it will work , I will mark your answer when I test it

 

Regards,

Ritesh

amitchandak
Super User
Super User

@ribisht17 , Make sure that Year, Qtr, and month are from the 'Certification Calendar Date' and it not a from a Auto date hierarchy , There should be columns from 'Certification Calendar Date' 

 

 

few version

 

CALCULATE(
sum('Master Certification Tab'[Certification Count_C]),
FILTER(
ALLSELECTED('Certification Calendar Date'[Cert Calendar Date]),
'Certification Calendar Date'[Cert Calendar Date]<= Max('Certification Calendar Date'[Cert Calendar Date])
)
)

 


CALCULATE(
sum('Master Certification Tab'[Certification Count_C]),
FILTER(
all('Certification Calendar Date'[Cert Calendar Date]),
'Certification Calendar Date'[Cert Calendar Date]<= Max('Certification Calendar Date'[Cert Calendar Date])
)
)

Join us as experts from around the world come together to shape the future of data and AI!
At the Microsoft Analytics Community Conference, global leaders and influential voices are stepping up to share their knowledge and help you master the latest in Microsoft Fabric, Copilot, and Purview.
️ November 12th-14th, 2024
 Online Event
Register Here

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.