Forum Discussion
Showing visual only when slicer selected
- 5 years ago
Hi Anonymous ,
I tried the following measure for transparency at my end without SWITCH statement and it works for me:
Make Transparent =IF(ISFILTERED(ClothingSales[Category]),"#FFFFFF00","#FFFFFF")Try this and see if it works.Also, in your measure, you are missing "#" from 2nd condition. You are just using "FFFFFF". It should be "#FFFFFF'.Thanks,Pragati - 5 years ago
Hi Anonymous ,
I wrote a blog sometime back on similar functionality. Can you check once if you are following all these similar steps:
If still it doesn't work, then share your pbix file by removing any sensitive information from it.
Also I am wondering; if this was not working then why was the solution accepted. 🙂
Thanks,
Pragati
Hi Anonymous ,
Can you share your measure please? I tried the similar scenario at my end and it works.
Do add some screenshots as you haven't shared anything on what you are seeing at your end.
Thanks,
Pragati
Hi Pragati11,
Thanks for your response.
So here's my visualisation:
And this is the measure I'm using:
Here's the visualisation with my overlaid treemap (which I've made smaller so you can see how it's just opaque white). Based on the measure it should be transparent now, since a slicer value is selected, but it remains solid white.
I know it's a problem with the transparency, as if I change the measure to show blue when a slicer value is selected, the treemap does indeed turn blue when I use the slicer.
Any ideas what I'm doing wrong?
Thanks very much.
- Pragati115 years ago
Super User
Hi Anonymous ,
I tried the following measure for transparency at my end without SWITCH statement and it works for me:
Make Transparent =IF(ISFILTERED(ClothingSales[Category]),"#FFFFFF00","#FFFFFF")Try this and see if it works.Also, in your measure, you are missing "#" from 2nd condition. You are just using "FFFFFF". It should be "#FFFFFF'.Thanks,Pragati- Anonymous5 years agoNot applicable
Hi Pragati11
Thanks for your reply and sorry for the delay in responding. It still doesn't work for me -- I had initially tried using the IF statement and it hadn't worked, so I tried using the switch function instead.
This is what I see:
I know the problem lies in the transparency because it works when I change the colour. So for example, if I set it to turn blue when the slicer is selected but otherwise remain white, it works:
Any ideas why it's not working for transparency?
Thanks in advance!
- Pragati115 years ago
Super User
Hi Anonymous ,
Your DAX is different to what I suggested. Can you use exact DAX and try:
Make Transparent =IF(ISFILTERED(ClothingSales[Category]),"#FFFFFF00","#FFFFFF")Thanks,Pragati