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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Jukie
Frequent Visitor

Hide a Card Visual unless 1 item is selected in Slicer.

Hello!  I've been unable to find a suggested solution that makes this work, but I am still quite new at this.

 

I have a Card visual: 'Table 1'[POC] (Point of Contact)

I have a Slicer: 'Table 1'[Role]

 

When no Roles (0) or more than one (>1)  Role have been selected in the Slicer, the Card should be hidden.

When exactly one (=1) Role has been selected in the Slicer, the Card should be visible.

 

I've tried at least 10 various measures that include ISFiltered, HasOneValue, SelectedValue... next time I will remember to capture them as I go.  Any ideas that fit this situation would be appreciated!

1 ACCEPTED SOLUTION
rsbin
Super User
Super User

@Jukie ,

Here is alternative solution.  It doesn't "hide" the card visual, but guides the User to make a selection.

PointofContact = IF(
           HASONEVALUE( Table1[Role] ) = TRUE(), MAX( Table1[POC] ),
           "Please Select One Value from the Slicer" )

You can create a message in the quotes to your liking.

Hope this works for you instead of "hiding" the visual entirely.

Regards,

View solution in original post

4 REPLIES 4
Jukie
Frequent Visitor

@rsbin Thank you for your response.  I am perfectly happy to have it display text instead of hiding.  However, for some reason it is still not working.

1.) Created the measure exactly as directed above and updated the table[field] names.

2.) Added the measure to the 'Filters on this visual' for the POC card.

The slicer still works, but the measure has no affect on the POC card.  Without anything selected in the slicer, the data card still shows the top line of data and not the text noted above.

 

Clearly I am doing something wrong!  Is there some setting that would affect it?  When I add the measure to the Card, the ability to apply it is grayed out and the dropdown to make any changes to when the item is shown does not work. 

@Jukie ,

Do not drag this Measure to the Filter Pane.  Drag it to the Field Value well (It will by default appear in the Filter Pane).

rsbin_0-1721306340723.png

Please see attached pbix file.

Regards,

Jukie
Frequent Visitor

@rsbin Worked like a charm!  Thank you very much for your help and for the valuable lesson for the future!  Now I understand why all the other things I tried didn't work and how to deal with it next time.  So appreciated!

rsbin
Super User
Super User

@Jukie ,

Here is alternative solution.  It doesn't "hide" the card visual, but guides the User to make a selection.

PointofContact = IF(
           HASONEVALUE( Table1[Role] ) = TRUE(), MAX( Table1[POC] ),
           "Please Select One Value from the Slicer" )

You can create a message in the quotes to your liking.

Hope this works for you instead of "hiding" the visual entirely.

Regards,

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors