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

Vote for your favorite vizzies from the Power BI Dataviz World Championship submissions. Vote now!

Reply
Thulasiraman
Helper II
Helper II

Dax Error-Multiple value selected

Hi

I am new to power bi and I have an issue with a dax query.

I have a table containing names of products.

I have created a slicer of the products column

I have created a dax query - IF(VALUES('table'[products] = SELECTEDVALUE('table'[products], 1, 0)

 

I would like to return 1 if for the selected product in slicer and for other products 0

 

The matrix table is as below:

Product      measure

A                  1

B                   0

C                   0

 

When applied, I get error msg saying multiple values supplied.

 

Pls help.

 

 

 

 

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

One of ways to create a visualization as you needed is to have disconnected slicer table like below.

 

Untitled.pngUntitled1.png

 

Desired outcome measure: =
IF (
    HASONEVALUE ( 'Product'[Product] ),
    INT (
        SELECTEDVALUE ( 'Product'[Product] ) IN VALUES ( 'Slicer table'[Product] )
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

View solution in original post

3 REPLIES 3
Thulasiraman
Helper II
Helper II

Thank u sir.  It works !!!

In continuation to that, suppose if I want to get a value, say, a column in the product table containing sale amount instead of 1 or 0.....how to achieve this?  Would appreciate very much for your help.  Thanks

Hi,

Thank you for your feedback.

Please share your sample pbix file's link here, and then I can try to look into it to come with a more accurate solution.

 

Thank you.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Jihwan_Kim
Super User
Super User

Hi,

Please check the below picture and the attached pbix file.

One of ways to create a visualization as you needed is to have disconnected slicer table like below.

 

Untitled.pngUntitled1.png

 

Desired outcome measure: =
IF (
    HASONEVALUE ( 'Product'[Product] ),
    INT (
        SELECTEDVALUE ( 'Product'[Product] ) IN VALUES ( 'Slicer table'[Product] )
    )
)

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

Vote for your favorite vizzies from the Power BI World Championship submissions!

Sticker Challenge 2026 Carousel

Join our Community Sticker Challenge 2026

If you love stickers, then you will definitely want to check out our Community Sticker Challenge!

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 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.