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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Custom Slicer using DAX

I have a section of slicer visuals having slicers of selecting Month, Country, Product and Category and a section of a card visual and table visual. The card visual and the table visual gives garbage values when I select multiple values in the slicer visuals. How can I use DAX and show a message on the place of the card and table visual showcasing to select a single value and when a single value is selected the values are displayed.

1 REPLY 1
Dangar332
Super User
Super User

HI, @Anonymous 

use has HASONEFILTER()  this give you ability to select one value and give output in boolean value(true, false)

 

you can use IF() function  to implement your requirnment
like 

 

result = 
switch(true(),
    HASONEFILTER('tablename'[country]), your expression,

     HASONEFILTER('tablename'[month]),your expression,

    HASONEFILTER('tablename'[product]), your expression,

    HASONEFILTER('tablename'[category]), your expression,

    "select a single value")

here your expression means your calculation part


    

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

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.