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

How do I select muliple values in slicer when using selectvalue?

I am currently making muliple markers with shapes depending on which year you select in a slicer, these markers are transparant until selected but if i select multiple years it stops working (Since selectvalue only understand one value). How can i make them adapt to multiple selection? Current code that works for each year:

2008 Make Transparent =
      IF(
         SELECTEDVALUE(Data[Year])=2008
         "#2071B5"
         "#FFFFFF00" 
      )
1 ACCEPTED SOLUTION
AlphaBravo
New Member

Hi, Vinn 👋

 

The issue you're facing is due to the SELECTEDVALUE function. It returns a single selected value when a single value is selected in a slicer. If you have multiple values selected, it returns a blank.

Try using the following DAX:

2008 Make Transparent =
    IF(
        CONTAINS(ALLSELECTED(Data[Year]), [Year], 2008),
        "#2071B5",
        "#FFFFFF00"
    )

 

Make sure to replace Data[Year] with the corresponding Table and Column of your data.

View solution in original post

1 REPLY 1
AlphaBravo
New Member

Hi, Vinn 👋

 

The issue you're facing is due to the SELECTEDVALUE function. It returns a single selected value when a single value is selected in a slicer. If you have multiple values selected, it returns a blank.

Try using the following DAX:

2008 Make Transparent =
    IF(
        CONTAINS(ALLSELECTED(Data[Year]), [Year], 2008),
        "#2071B5",
        "#FFFFFF00"
    )

 

Make sure to replace Data[Year] with the corresponding Table and Column of your data.

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!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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