Forum Discussion

Ptolemaida's avatar
Ptolemaida
Frequent Visitor
1 year ago

Do not show visual based on specific slicer selection

I have a slicer with a text string (date+shop+city, for ex "202503StarbucksBrussels"). Based on the slicer i have a visual (a table with measure value) showing in my dashboard

If any option is selected in the slicer who contains 'Brussels' in it, i do not want to show the visual. So no table showing at all.

How could i do that?

Thanks

8 Replies

  • Ptolemaida Create a new measure:

    ShowTable =
    IF(
    CONTAINSSTRING(SELECTEDVALUE('YourTableName'[YourColumnName]), "Brussels"),
    0,
    1
    )

     

    Select the table visual you want to control.
    In the "Visualizations" pane, go to the "Filters on this visual" section.
    Drag the ShowTable measure to this section.
    Set the filter to show only when ShowTable is equal to 1.

    • Ptolemaida's avatar
      Ptolemaida
      Frequent Visitor

      bhanu_gautam  Thank you. This works, the table does not show any value. The problem is that the table itself is still there, with its header. 

      I want to have the table completely dissapeared when 'Brussels' is selected. How could i achieve that?

      • bhanu_gautam's avatar
        bhanu_gautam
        Super User

        Ptolemaida 

        Add a card visual to your report and set its value to the ShowTable measure. This card will be used to control the visibility of the table.

        Create a new measure to control the transparency of the table

        DAX
        TableTransparency =
        IF(
        [ShowTable] = 1,
        0,
        100
        )

         

        Select the table visual you want to control.

        In the "Visualizations" pane, go to the "Format" section, then to "Effects".

        Under "Background", click on the fx button next to the color picker to open the conditional formatting options.

        Set the "Based on field" to the TableTransparency measure and configure the transparency settings such that when TableTransparency is 100, the table is fully transparent (invisible).

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi Ptolemaida ,

    May I ask if you have gotten this issue resolved?

     

    If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.

     

    Regards,
    Chaithra.

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi Ptolemaida,

    As we haven’t heard back from you, we wanted to kindly follow up to check if the solution provided for the issue worked? or Let us know if you need any further assistance?
    If our response addressed, please mark it as Accept as solution and click Yes if you found it helpful.

  • v-echaithra's avatar
    v-echaithra
    Community Support

    Hi Ptolemaida ,

    May I ask if you have gotten this issue resolved?

     

    If it is solved, please mark the helpful reply or share your solution and accept it as solution, it will be helpful for other members of the community who have similar problems as yours to solve it faster.

     

    Regards,
    Chaithra.