Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowThe 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.
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:
Best
Isidor
Solved! Go to 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 slicer
select single or mul slicers
select 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.
@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
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 slicer
select single or mul slicers
select 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
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
102 | |
70 | |
68 | |
54 | |
41 |
User | Count |
---|---|
156 | |
83 | |
66 | |
64 | |
61 |