Forum Discussion
Using Filter in field Parameters Value
- 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)
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)
- P0werBIn00b2 years agoHelper I
Thank you isjoycewang,
Worked like a charm,
But could you explain why my previous code didn't work and this did??
- isjoycewang2 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- P0werBIn00b2 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??