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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Filtered Dax not showing correct result

Hey everyone!

I've got the following two DAX formula:

UPO Downloads = COUNTROWS('OD - UPO Downloads')

Running Total UPO Downloads = var maxDate = MAX('Dates'[Date]) return CALCULATE( 'OD - UPO Downloads'[UPO Downloads], REMOVEFILTERS( 'Dates'), 'Dates'[Date] <= maxDate)


And I've got the following filter and card:
LaZZaNoVa61_0-1654002373802.png

 

The Running Total Formula seems to ignore my filter.
So my question is: How can I make my Running Total Formula work in combination with the filter?

1 ACCEPTED SOLUTION
tamerj1
Super User
Super User

Hi @Anonymous 

please try

Running Total UPO Downloads =
VAR maxDate =
    MAX ( 'Dates'[Date] )
VAR minDate =
    MINX ( ALLSELECTED ( 'Dates' ), 'Dates'[Date] )
RETURN
    CALCULATE (
        'OD - UPO Downloads'[UPO Downloads],
        REMOVEFILTERS ( 'Dates' ),
        'Dates'[Date] <= maxDate,
        'Dates'[Date] >= minDate
    )

View solution in original post

3 REPLIES 3
tamerj1
Super User
Super User

Hi @Anonymous 

please try

Running Total UPO Downloads =
VAR maxDate =
    MAX ( 'Dates'[Date] )
VAR minDate =
    MINX ( ALLSELECTED ( 'Dates' ), 'Dates'[Date] )
RETURN
    CALCULATE (
        'OD - UPO Downloads'[UPO Downloads],
        REMOVEFILTERS ( 'Dates' ),
        'Dates'[Date] <= maxDate,
        'Dates'[Date] >= minDate
    )
Greg_Deckler
Community Champion
Community Champion

@Anonymous Well, yes, you used REMOVEFILTER so that is going to blow away all filters on that table. Try:

Running Total UPO Downloads = 
var maxDate = MAX('Dates'[Date]) 
var minDate = MIN('Dates'[Date]) 
return CALCULATE( 'OD - UPO Downloads'[UPO Downloads], REMOVEFILTERS( 'Dates'), 'Dates'[Date] <= maxDate, 'Dates'[Date] >= minDate)


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...
Anonymous
Not applicable

Hey Greg,

I've tried your Dax formula, but that one returns only the amount of downloads of the last day. (31-3-2022) 
Instead of a running total of the entire period.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.