Forum Discussion

ArchStanton's avatar
ArchStanton
Power Participant
2 years ago
Solved

KEEPFILTERS?

Hi,
The following measure shows the same total for each person

 

SI Team = 
CALCULATE(
    [All Cases],
    Owners[Name] IN {"Ian Bloggs", "Siobhan Bloggs", "George Best", "Billy Chaplin"})

 

 

When I add KEEPFILTERS to fix the measure I get the following error - any ideas how to fix this?

 

SI Team = 
CALCULATE(
    KEEPFILTERS(
    [All Cases]),
    Owners[Name] IN {"Ian Bloggs", "Siobhan Bloggs", "George Best", "Billy Chaplin"})

 


I'm guessing this has something to do with the Team structure hierarchy?
Thanks

  • The KEEPFILTERS function goes around the filter argument, not the measure.

     

    Try this instead:

     

    SI Team =
    CALCULATE (
        [All Cases],
        KEEPFILTERS ( Owners[Name] IN { "Ian Bloggs", "Siobhan Bloggs", "George Best", "Billy Chaplin" } )
    )
    

     

4 Replies

  • The KEEPFILTERS function goes around the filter argument, not the measure.

     

    Try this instead:

     

    SI Team =
    CALCULATE (
        [All Cases],
        KEEPFILTERS ( Owners[Name] IN { "Ian Bloggs", "Siobhan Bloggs", "George Best", "Billy Chaplin" } )
    )
    

     

  • ajohnso2's avatar
    ajohnso2
    Solution Supplier

    What is the dax inside your measure namec All Cases?