Forum Discussion
Do not show visual based on specific slicer selection
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.
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_gautam1 year agoSuper User
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).
- Ptolemaida1 year agoFrequent Visitor
bhanu_gautam Thank you. Not sure that i correctly understand the approach. Do you mean to add a card, which i put on top of the table that i use? Do i need to apply the background settings to the new card, or the original table?
- bhanu_gautam1 year agoSuper User
Ptolemaida You do not need to place the card on top of the table. The card is simply used to display the value of ShowTable and does not need to overlap with the table. The background settings should be applied to the original table visual, not the card.