Forum Discussion
P0werBIn00b
2 years agoHelper I
Using Filter in field Parameters Value
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 t...
- 2 years ago
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)
isjoycewang
2 years agoSolution Supplier
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
P0werBIn00b
2 years agoHelper I
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.
IsParameter Filtered = IF(CALCULATE(ISFILTERED('DV States'[Country]),ALLSELECTED('DV States')) || CALCULATE(ISFILTERED('DV Orders'[Product Category]),ALLSELECTED('DV Orders')) || CALCULATE(ISFILTERED('DV Orders'[Product Sub Category]),ALLSELECTED('DV Orders')),1,0)
background color = IF(([IsParameter Filtered])=1,"#FFFFFF","#FFFFFF00")
But it doesnt work??