Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago

Show or Hide a Visual Based on Slicer Selection

Hello everyone,

 

Is it possible to create a measure that sends a Card behind a table if I have selected a single value in the slicer?

 

Here's my problem:

I have a page with a table and a card that should show values only if a slicer had a single value selected.

To solve this, I used the formula:

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

That I found in this topic:

https://community.powerbi.com/t5/Desktop/Visualisations-blank-until-something-selected-in-a-slicer/td-p/109790

 

But this measure does not work with the Card, only with the table.

 

Searching a little more, I found this "solution":

https://exceleratorbi.com.au/show-or-hide-a-power-bi-visual-based-on-selection/

Basically I can create a card that becomes transparent when I have a value selected in the slicer.

 

But the transparent card is in front of the table, preventing me from clicking to trigger spotlight mode, for example.

 

Any ideas on how to solve this problem?

 

Best Regards

3 Replies

  • v-juanli-msft's avatar
    v-juanli-msft
    Icon for Community Support rankCommunity Support

    Hi Anonymous 

    A workaround is as below:

    Resize the table visual as below

    Turn off the "Visual header" option for the card visual

    Put card visual on top of table visual, group them (new feature since 2019/8, more details here)

    Save and publish to Power BI Service

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

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      Hello v-juanli-msft , thanks for your help.

       

      Unfortunately, my PBI is still in the June update. Software updates at the company I work take a while to happen :(

      • v-juanli-msft's avatar
        v-juanli-msft
        Icon for Community Support rankCommunity Support

        Hi Anonymous 

        You could download lastest version here. It is free.

        The new version always supports older version Power BI files.

        After changing reports with new version Power BI Desktop, you could publish the report to Power BI Service to replace the old one.

         

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