Forum Discussion

ArchStanton's avatar
ArchStanton
Icon for Power Participant rankPower 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
    Icon for Solution Supplier rankSolution Supplier

    What is the dax inside your measure namec All Cases?

    • ArchStanton's avatar
      ArchStanton
      Icon for Power Participant rankPower Participant
      All Cases = 
                 DISTINCTCOUNT('Cases'[Case Number]
                  )