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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
ArchStanton
Impactful Individual
Impactful Individual

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
Super User
Super User

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!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

March2025 Carousel

Fabric Community Update - March 2025

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

Top Kudoed Authors