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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
ribisht17
Super User
Super User

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])
)
)

View solution in original post

2 REPLIES 2
ribisht17
Super User
Super User

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])
)
)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

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.