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
ArchStanton
Post Prodigy
Post Prodigy

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"})

 

ArchStanton_0-1722586710338.png

 

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"})

 

ArchStanton_1-1722587130754.png
I'm guessing this has something to do with the Team structure hierarchy?
Thanks

1 ACCEPTED SOLUTION
AlexisOlson
Super User
Super User

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" } )
)

 

View solution in original post

4 REPLIES 4
AlexisOlson
Super User
Super User

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" } )
)

 

Thanks, that works!👍

ajohnso2
Solution Supplier
Solution Supplier

What is the dax inside your measure namec All Cases?

All Cases = 
           DISTINCTCOUNT('Cases'[Case Number]
            )

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.