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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
MarkPalmberg
Kudo Collector
Kudo Collector

alternative to ISFILTERED when Select All is used

I have a measure I'm using to limit the data that appears on a map visual. It looks like this:

 

ShowMap = 
VAR UnitFilter =
    IF(
        ISFILTERED('Pool View'[UNIT])
        ,1
        ,0)

VAR TierFilter =
    IF(ISFILTERED('Pool View'[TIER])
        ,1
        ,0
    )

VAR StateFilter =
    IF(ISFILTERED('Pool View'[STATE])
        ,1
        ,0
    )

VAR FilterSum = UnitFilter + TierFilter + StateFilter

RETURN
    IF(FilterSum = 3,"Y","N")

Trouble arises when someone uses Select All in the Tier filter. There are six values there, and I'm trying to avoid having my users individually select all the values when they want to include them all. What's a good substitue for ISFILTERED when Select All is in play? Thanks.

1 ACCEPTED SOLUTION
MarkPalmberg
Kudo Collector
Kudo Collector

I modified the measure as so, which now works.

 

ShowMap = 
VAR UnitFilter =
    IF(
        ISFILTERED('Pool View'[UNIT])
        ,1
        ,0)

VAR TierFilter =
    IF(
        COUNTROWS(DISTINCT(ALLSELECTED('Pool View'[TIER]))) >= 1
        ,1
        ,0
    )

VAR StateFilter =
    IF(ISFILTERED('Pool View'[STATE])
        ,1
        ,0
    )

VAR FilterSum = UnitFilter + TierFilter + StateFilter

RETURN
    IF(FilterSum = 3,"Y","N")

View solution in original post

1 REPLY 1
MarkPalmberg
Kudo Collector
Kudo Collector

I modified the measure as so, which now works.

 

ShowMap = 
VAR UnitFilter =
    IF(
        ISFILTERED('Pool View'[UNIT])
        ,1
        ,0)

VAR TierFilter =
    IF(
        COUNTROWS(DISTINCT(ALLSELECTED('Pool View'[TIER]))) >= 1
        ,1
        ,0
    )

VAR StateFilter =
    IF(ISFILTERED('Pool View'[STATE])
        ,1
        ,0
    )

VAR FilterSum = UnitFilter + TierFilter + StateFilter

RETURN
    IF(FilterSum = 3,"Y","N")

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors