The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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!
Solved! Go to Solution.
@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,
@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).
Please see attached pbix file.
Regards,
@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!
@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,