Hide visualisation till another is filtered

I have 2 bar charts for holidays taken. The first is broken down by department, the second by employee. The employee one is hard to read when a department isn’t selected from the top due to the number of employees.

Is there a way I can make the employee chart not show anything until a department is selected from the top? Perhaps even a message showing “Please select a department above” or something?

Attached is a cutdown version of my report.

Thanks,

Example.pbix (32.0 KB)

1 Like

Hi @jamie.bryan

Create a measure like below

1 Like

@jamie.bryan ,

Yes! I actually worked out a solution to an almost identical problem earlier this year with another member who wanted to show/hide a visual based on whether or not it met the threshold for necessary sample size. You can do this in DAX by manipulating the value of the transparency mask. In your case, you’ll probably want to use an IF(ISFILTERED()) construct to determine whether there is a selection made in your slicer, and depending on the result add the two extra zeros to the hex code to turn it transparent.

Take a look at the following threads – I think they will give you everything you need to solve this one.

– Brian

3 Likes

Will check this out, I have no doubt this is going to get asked of me at some point in the future.

@DavieJoe ,

Once you know the trick about manipulating the hex code transparency with the seventh and eighth characters, it opens the door to doing all kinds of cool stuff.

Here’s a video I did a while back about a free tool that makes working with hex codes much easier:

– Brian

1 Like

Marvelous, will be storing this away for a view & read a bit later, thanks again.

1 Like

@Rajesh @BrianJ

Thank you both, by your powers combined I’ve got this working now. Very handy tips to keep in mind!

4 Likes