cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Dave0145 Frequent Visitor
Frequent Visitor

Visualisations blank until something selected in a slicer

The default functionality for a slicer in Power BI seems to be that if nothing is selected in a slicer then all records are shown in visualisations on the same report where the interactions are set as filter. What I would like to be able to do is not show anything in these other visualisations until one or more entries are selected in the slicer. Is this possible?

1 ACCEPTED SOLUTION

Accepted Solutions
Moderator v-qiuyu-msft
Moderator

Re: Visualisations blank until something selected in a slicer

Hi @Dave0145,

 

For your requirement, you can create a measure like this:

 

SlicerCheck = =if(calculate(distinctcount([SlicerColumn]),allselected([SlicerColumn]))=1,"Y","N")

 

Then place this measure in a table visual, set filter condition as is Y. If you want to select multiple values in a slicer, set is N.

 

For more information, see:

Empty table with a slicer

visual filter problem--unpredictable behavior

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

18 REPLIES 18
Dave0145 Frequent Visitor
Frequent Visitor

Re: Visualisations blank until something selected in a slicer

Further explanation:

 

- if nothing selected in slicer, show no data items in associated visualisation

- if one or more items selected in slicer, show data for those in associated visualisation (as per current slicer functionality

- if Select All chosen in slicer, show data for all items in associated visualisation

tjd Established Member
Established Member

Re: Visualisations blank until something selected in a slicer

The Curbal video at https://www.youtube.com/watch?v=gYbGNeYD4OY&t=52s, starting at about 04:15, shows how to create a blank in a visualization until a slicer value is selected. 

Moderator v-qiuyu-msft
Moderator

Re: Visualisations blank until something selected in a slicer

Hi @Dave0145,

 

For your requirement, you can create a measure like this:

 

SlicerCheck = =if(calculate(distinctcount([SlicerColumn]),allselected([SlicerColumn]))=1,"Y","N")

 

Then place this measure in a table visual, set filter condition as is Y. If you want to select multiple values in a slicer, set is N.

 

For more information, see:

Empty table with a slicer

visual filter problem--unpredictable behavior

 

Best Regards,
Qiuyun Yu

Community Support Team _ Qiuyun Yu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

ruthpozuelo
Advisor

Re: Visualisations blank until something selected in a slicer

Many thanks for the mention! /Ruth
Dave0145 Frequent Visitor
Frequent Visitor

Re: Visualisations blank until something selected in a slicer

thank you - that works.

belvoir Member
Member

Re: Visualisations blank until something selected in a slicer

@v-qiuyu-msft - great solution, thanks! +1

 

I did note that if you bring the measure onto a table as a column, then the calculation slows down considerably, so best to have it only on the visual level filter.

 

I noted also that you can't have it on the Page level or Report level filter, but you can of course drag it onto the visual level filter for other tables.

AnetaK Member
Member

Re: Visualisations blank until something selected in a slicer

Hello,

 

I've used this solution to hide a claster column chart and it works.

I've also tried to hide a card with text inside but the visual filter is not working, I can't choose anything, it's blocked.

Can anybody suggest what can be done in that situation?

Is it impossible to use a measure-filter in a card?

 

What I want to achieve?

I want the card to be invisible until a room on a visual is chosen.

 

 

Przechwytywanie.PNG

Re: Visualisations blank until something selected in a slicer

I added the SlicerCheck to a test card to confirm it was picking up the slicer correctly and it shows a Y when sliced and N when not sliced. (which is great!).  When I add the SlicerCheck to my other card (the one I actually need it to work on), I am adding it to the visual level filters area, it doesn't give me options to filter by. I can click the arrow to expand but I can't type in the contains box underneath.  

 

this works on isolated card

SlicerCheck = if(calculate(distinctcount('DataSet'[Analyst]),allselected('DataSet'[Analyst]))=1,"Y","N")

 

My slicer is just a list of analyst names 'Dataset'[Analyst]

 

Please help me find out why the filtering isn't allowing me to click on anything.  *if the funcationality isn't there for filter a card's visual then it shouldn't have the option to add there. 

 

Can a KPI be used for this same purpose? Do it allow for the visual filter to be entered?

vega Member
Member

Re: Visualisations blank until something selected in a slicer

I'm not quite sure how this solves the problem. I thought I had a similar problem to OP. I need to have a table that is blank until someone selects something in the slicer (one or more values). This solution works fine for a slicer when multiple values cannot be selected. But when multiple values are selected, it does not work.

 

The formula is checking if there is one value selected. If we select one value this is fine, but multiple selected values are treated the same way as no value selected, this is where the problem is.

Helpful resources

Announcements
Exclusive LIVE Community Event #3 – Ask Arun Anything

Exclusive LIVE Community Event #3 – Ask Arun Anything

Join us in the third Triple A event!

Meet the 2020 Season 1 Power BI Super Users!

Meet the 2020 Season 1 Power BI Super Users!

It’s the start of a new Super User season! Learn all about the new Super Users and brand-new tiered recognition system.

Super User Challenge: Can You Solve These?

Super User Challenge: Can You Solve These?

We're celebrating the start of the New Super User season with our first ever Super User 'Can You Solve These?' challenge.

Power BI Desktop Update - February 2020

Power BI Desktop Update - February 2020

We are super excited for our update this month, as we are releasing two of our top community requests!

Power Platform Online Conference

Power Platform Online Conference

Join us for the first ever Power Platform Online Conference!

Top Solution Authors