Forum Discussion

Aragorn's avatar
Aragorn
Helper I
3 years ago
Solved

Hide Visual based on Selection

Hi,

 I have a PIE CHART which contains 2 measures as its values:
 

 

CountGood = CALCULATE(COUNT(ObjectsTbl[Obj_Id]), FILTER(ALL(ObjectsTbl), ObjectsTbl[Obj_Type] = SELECTEDVALUE('ObjectsTbl'[Obj_Type]) && ObjectsTbl[objState] = "Good" ))
CountBad= CALCULATE(COUNT(ObjectsTbl[Obj_Id]), FILTER(ALL(ObjectsTbl), ObjectsTbl[Obj_Type] = SELECTEDVALUE('ObjectsTbl'[Obj_Type]) && ObjectsTbl[objState] = "Bad" ))

 

 

I want to hide this visual when an item from a table of all objects are listed is selected,
So I tried to create another measure like this:

 

ShowChart = IF(ISFILTERED(ObjectsTbl[Obj_Id]), 1, 0)

 

 

But when I try to add this to the Visual's  Filters, it doesn't let me choose a condition.
What am I doing wrong? How can I Hide this visual?

 

Regards,
K