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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Resolver IV
Resolver IV

What is the dax inside your measure namec All Cases?

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

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

AugPowerBI_Carousel

Power BI Monthly Update - August 2024

Check out the August 2024 Power BI update to learn about new features.

August Carousel

Fabric Community Update - August 2024

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