jcoke
jcoke

Reputation: 1891

Stop visual from showing if a column has been filtered and also in the table

I have come across a caveat of using ISFILTERED when the column you are checking is also within that main table.

Lets say I have a table that has two columns, one called Campaign and the other called margin.

I have a Campaign slicer and I want to show the table only when specifically that slicer has been filtered, however, this does not work as a visual level filter as the Campaign column is also within the table so in essence it is already in context filtering the table.

So even though the DAX code will return 0 in the card visual, the table will still be visible.

enter image description here

Is there a workaround for this?

Upvotes: 1

Views: 119

Answers (1)

Sam Nseir
Sam Nseir

Reputation: 12111

You can do it like so:

Is Filtered = IF(CALCULATE(ISFILTERED('YourTable'), ALLSELECTED('YourTable')), "yes")

Upvotes: 1

Related Questions