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
Anonymous
Not applicable

A solution for the "ISFILTERED() SELECT ALL" Problem

Dear Community,

 

with reference to the below attached link, the ISFILTERED() command works like a charm with one serious limitation: if you "select all", the command will return as if no value is selected. Hence a command like the following is not working in such a scenario:

 

Measure1 =
CALCULATE ( IF ( ISFILTERED ( Table[Column] ), 1, 0 ), ALLSELECTED ( Table ) )

Is there a solution to this problem from your perspective?

 

Note that @pborah has raised this question already in the attached link, but since it was burried in the comments where no attention was drawn to it yet and since multiple users have problems with it, I thought it's time for swarm intelligence via opening a seperate topic.

 

Reference:

https://community.powerbi.com/t5/Desktop/Show-blank-when-nothing-is-selected-in-the-slicers/td-p/659...

 

Best

Isidor

1 ACCEPTED SOLUTION

Hi @Anonymous ,

Based on your description, you can create a slicer table using this formula, use it as a slicer:

Slicer table =
UNION ( ROW ( "Country", "Select all" ), DISTINCT ( 'Table'[Country] ) )

Create this measure, put it in a visual filter and set its value as 1:

Measure = 
IF (
    ISFILTERED ( 'Slicer table'[Country] ),
    IF (
        SELECTEDVALUE ( 'Slicer table'[Country] ) = "Select all",
        1,
        IF (
            SELECTEDVALUE ( 'Table'[Country] ) IN DISTINCT ( 'Slicer table'[Country] ),
            1,
            0
        )
    ),
    0
)

without select any slicerwithout select any slicerselect single or mul slicersselect single or mul slicersselect allselect all

Attached a sample file in the below that you can refer, hopes to help you.

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

5 REPLIES 5
amitchandak
Super User
Super User

@Anonymous , First of all why there is a need to use all selected here.  If I am using all selected with only isfiltered , what is remained to be filtered? 

 

Allselected needs to be part of measure and isfiltered can return such measure

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Dear @amitchandak ,

 

how would such a measure look like?

 

Thanks

Anonymous
Not applicable

Dear @amitchandak ,

 

If I understand you correctly, you want to know why use the "Select all" option in the first place, so first of all let me specify the problem further, imagine you have a bunch of countries, and if you have selected nothing, you don't want the table or visual to show anything. In the below case with two countries there is no real necassity for  the"Select all" button, but imagine you have 20-30 countries, and at the same time you want

1. see nothing when nothing is selected

2. have possibility to view single countries

3. but if you want to view all countries as a whole, selecting all of them single handedly can cause pain in the finger, without the select all option to click.

 

Best

Isidore

Hi @Anonymous ,

Based on your description, you can create a slicer table using this formula, use it as a slicer:

Slicer table =
UNION ( ROW ( "Country", "Select all" ), DISTINCT ( 'Table'[Country] ) )

Create this measure, put it in a visual filter and set its value as 1:

Measure = 
IF (
    ISFILTERED ( 'Slicer table'[Country] ),
    IF (
        SELECTEDVALUE ( 'Slicer table'[Country] ) = "Select all",
        1,
        IF (
            SELECTEDVALUE ( 'Table'[Country] ) IN DISTINCT ( 'Slicer table'[Country] ),
            1,
            0
        )
    ),
    0
)

without select any slicerwithout select any slicerselect single or mul slicersselect single or mul slicersselect allselect all

Attached a sample file in the below that you can refer, hopes to help you.

 

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

How to put select all option on the top 

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!

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!

Feb2025 NL Carousel

Fabric Community Update - February 2025

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