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

The Power BI DataViz World Championships are on! With four chances to enter, you could win a spot in the LIVE Grand Finale in Las Vegas. Show off your skills.

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
Feb2025 Sticker Challenge

Join our Community Sticker Challenge 2025

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

Jan NL Carousel

Fabric Community Update - January 2025

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

Top Kudoed Authors