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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.