Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello Community,
I was using Field Parameters as a slicer. The dax of my field parameters is as
I create a slicer to select either Country, Product Category, or Product Sub Category.
All these columns also have multiple values. What I want to do Now is add another slicer which shows column values for country when country parameter is selected, Product Category when product category is selected and so on.
Note: In power BI desktop, if we add the parameter to slicer it adds my three parameter values Country, Product Category and Product sub categroy into slicer, But if I drag and drop parameter into chart and change it into slicer later it shows the column value for the selected parameter.
Now I have two slicer with same field parameter. One shows three values which I added in field parameter. Another slicer also has the same parameter but it shows the column values for the the parameter although they have the same field value. (I dont know why they are different?)
When I select country parameter another slicer shows all the list of countries. But if I dont select anything, the visuals shows all the countries in its visual. I want to show the visuals only when at least one value is selected from both visuals.
These are the dax I tried:
To check if any parameter is selected:
To check if any filter is selected:
I also tried this to check if any filter is applied:
test = IF(ISFILTERED('Country and Category Comparison'[Parameter]),1,0)
Can someone help please!!!
Solved! Go to Solution.
Hi @P0werBIn00b ,
Could you try below measure and apply it to your table?
If it's not working, please let us know more about the visual which you want to hide.
Selected2 =
IF(
CALCULATE(ISFILTERED('Table'[Sub Product]),ALLSELECTED('Table')) ||
CALCULATE(ISFILTERED('Table'[Product]) ,ALLSELECTED('Table')) ||
CALCULATE(ISFILTERED('Table'[Country]),ALLSELECTED('Table')), 1 , 0)
Hi @P0werBIn00b ,
1. Please create a new shape on the visual you want to hide when the slicer is unselected.
2. Create below measure to define the visibility
*Change 'Table' to your TableName
Selected =
IF( ISFILTERED('Table'[Sub Product]) || ISFILTERED('Table'[Product]) || ISFILTERED('Table'[Country]), "#FFFFFF00" , "White")
3. Appy this measure to the color fx of your shape
So it should be invisible when the slicer is unselected as below.
Hello @isjoycewang ,
I get what you are saying, but I wouldn't be able to click on anything on my visual, would I?
Hi @P0werBIn00b ,
Could you try below measure and apply it to your table?
If it's not working, please let us know more about the visual which you want to hide.
Selected2 =
IF(
CALCULATE(ISFILTERED('Table'[Sub Product]),ALLSELECTED('Table')) ||
CALCULATE(ISFILTERED('Table'[Product]) ,ALLSELECTED('Table')) ||
CALCULATE(ISFILTERED('Table'[Country]),ALLSELECTED('Table')), 1 , 0)
Thank you @isjoycewang,
Worked like a charm,
But could you explain why my previous code didn't work and this did??
Hi @P0werBIn00b,
Since you're using this code in a table visual, the context inside the table should be considered as well.
More info about removing context filter, please refer to ALLSELECT function:
https://learn.microsoft.com/en-us/dax/allselected-function-dax
Hello @isjoycewang ,
Thank you for your response,
One last question,
With the above filter in visual. I also want to make the background transparent if visual is not available and white background if visual is available.
Check out the July 2025 Power BI update to learn about new features.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
User | Count |
---|---|
69 | |
68 | |
40 | |
29 | |
26 |
User | Count |
---|---|
88 | |
49 | |
45 | |
38 | |
37 |