Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
mosarahit48
Frequent Visitor

Hide Card Visuals having "Measure" as a value field

Hello Folks,

I have a Report View Page with 2 Pie charts, One Slicer and 15 Cards as Visual element. Each Card visual has "Measure" into the Field.
I would like to hide specific card visual, based on applying Slicer (filter) selection. 
To implement this solution I created a New Measure, 
Hide Visual = INT(ISFiltered(**Table [Name]**))
I applied this measure into the card visual level filter, unfortunately I m not able to apply the settings on the filter as the button is Disbaled. @amitchandak 
I would appreciate for a help or Solution 🙂
Thanks.

1 ACCEPTED SOLUTION
v-rongtiep-msft
Community Support
Community Support

Hi @mosarahit48 ,

It sounds like you are trying to use a measure to dynamically hide certain card visuals based on a slicer selection in Power BI. To do this, you can create a measure that returns a value of 1 or 0 depending on whether the slicer selection should hide or show the card visual. Then, you can use this measure in the visual level filter for the card visual.

Here's an example of how you can create the measure:

 

Hide Visual =
IF (
SELECTEDVALUE ( Table[Name] ) = "Name to hide",1,0)



Replace "Table[Name]" with the name of the column that contains the names of the items you want to hide/show. Replace "Name to hide" with the name of the item you want to hide.

Then, go to the visual level filter for the card visual and select "Hide Visual" as the filter field. Set the filter type to "is", and set the filter value to "0". This will show the card visual when the measure returns a value of 0 (i.e., when the slicer selection does not match the item to hide).

Note that the button may be disabled if you are not in the edit mode for the report. Make sure to switch to edit mode before trying to apply the filter settings.

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

View solution in original post

2 REPLIES 2
v-rongtiep-msft
Community Support
Community Support

Hi @mosarahit48 ,

It sounds like you are trying to use a measure to dynamically hide certain card visuals based on a slicer selection in Power BI. To do this, you can create a measure that returns a value of 1 or 0 depending on whether the slicer selection should hide or show the card visual. Then, you can use this measure in the visual level filter for the card visual.

Here's an example of how you can create the measure:

 

Hide Visual =
IF (
SELECTEDVALUE ( Table[Name] ) = "Name to hide",1,0)



Replace "Table[Name]" with the name of the column that contains the names of the items you want to hide/show. Replace "Name to hide" with the name of the item you want to hide.

Then, go to the visual level filter for the card visual and select "Hide Visual" as the filter field. Set the filter type to "is", and set the filter value to "0". This will show the card visual when the measure returns a value of 0 (i.e., when the slicer selection does not match the item to hide).

Note that the button may be disabled if you are not in the edit mode for the report. Make sure to switch to edit mode before trying to apply the filter settings.

 

How to Get Your Question Answered Quickly 

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data) .

 

Best Regards
Community Support Team _ Rongtie

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

 

Hello, I have a very similar situation. I have a measure "Hide Card" that evaluates to either 1 or 0. 
I also have a card visual, when I add the "Hide Card" measure to the list of "Filters on this visual", am not able to set "is" 1. The whole filter is disabled.

It works when I use it on a bar chart, but doesn't work on a Card or Donut visuals for me.

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.