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

View all the Fabric Data Days sessions on demand. View schedule

Reply
Anonymous
Not applicable

Display a message on selecting incorrect value in slicer and show the visualisation as blank

Hi Team,

 

Greetings!!

I came across a requirement, wherein I have a slicer with the values as ABC, XYZ, DEF. Now there are two things that are required.

1. In the slicer, the value DEF must be always selected by default. (I hope this can be partially achieved by Chiclet Slicer)

2. If any user deselects the value DEF and selects ABC and XYZ, then I need to display a message on a multi row card that only two values can be selected and one of them has to be 'DEF' and also the visualisation should show as blank.
Note: I need to select only two values and not all three togther.

 

May I request you to kindly assist me on this.

 

Thanks,

Ani91 

1 ACCEPTED SOLUTION
Greg_Deckler
Community Champion
Community Champion

Try this:

 

Slicer Verify = 
VAR slicerCount = COUNTROWS(Slicer)
VAR containsDEF = CONTAINS(Slicer,Slicer[Value],"DEF")
RETURN IF(slicerCount = 2 && containsDEF,"Selection OK","Please pick 2 and must contain DEF")


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

2 REPLIES 2
Greg_Deckler
Community Champion
Community Champion

Try this:

 

Slicer Verify = 
VAR slicerCount = COUNTROWS(Slicer)
VAR containsDEF = CONTAINS(Slicer,Slicer[Value],"DEF")
RETURN IF(slicerCount = 2 && containsDEF,"Selection OK","Please pick 2 and must contain DEF")


Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not applicable

Hi Greg

This worked amazingly. Thank you so much.
Just a further question, On incorrect selection, i.e. if the selection does not contain DEF then the visualizations should go blank. Can this be achieved?

 

Thanks.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors