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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
mmills2018
Helper IV
Helper IV

Multiple Selection In Slicer

Hello,

 

I have the below measure that works great.  Management Level group is my slicer and then i filter the slicer it gives me the correct number of promotions.  what i want to do is to be able to select, three different values in my slicer at the same time, so M4+,M1-M3 and P1-P6 and return a new measure, what i am trying to do is highlighted in red.  any ideas on how i can get this to work?

 

test women promos = VAR Selection = SELECTEDVALUE('Snapshots (Prod)'[Management Level (groups)])
return

SWITCH(TRUE(),
Selection="M4+", [Count Global Women Promotion to M4+]+0,
Selection="M1-M3", [Count Global Women Promotion to M1-M3]+0,
Selection = "P1-P6", [Count Global Women Promotion to P1-P6]+0,
Selection = "M4+" && "M1-M3" &&"P1-P6",[Count Global Women to Professional]
Selection = "01-04", [Count Global Women Promotion to O1-O4]+0,
Selection = "T1-T4", [Count Global Women Promotion to T1-T4]+0,
Selection = "B1-B4", [Count Global Women Promotion to B1-B4]+0,
( [Count Global Women Promotion to M4+]+[Count Global Women Promotion to M1-M3]+[Count Global Women Promotion to P1-P6]+[Count Global Women Promotion to O1-O4]+[Count Global Women Promotion to T1-T4]+[Count Global Women Promotion to B1-B4]+0))
1 ACCEPTED SOLUTION

Hi @mmills2018 ,


Please try this formula.

test women promos = 
VAR Selection = CONCATENATEX( 'Snapshots (Prod)', [Management Level (groups)], "," )
RETURN
SWITCH(
    TRUE(),
    Selection= "M4+", [Count Global Women Promotion to M4+]+0,
    Selection= "M1-M3", [Count Global Women Promotion to M1-M3]+0,
    Selection = "P1-P6", [Count Global Women Promotion to P1-P6]+0,
    Selection = "M4+,M1-M3,P1-P6",[Count Global Women to Professional]+0,
    Selection = "01-04", [Count Global Women Promotion to O1-O4]+0,
    Selection = "T1-T4", [Count Global Women Promotion to T1-T4]+0,
    Selection = "B1-B4", [Count Global Women Promotion to B1-B4]+0,
    ( [Count Global Women Promotion to M4+]+[Count Global Women Promotion to M1-M3]+[Count Global Women Promotion to P1-P6]+[Count Global Women Promotion to O1-O4]+[Count Global Women Promotion to T1-T4]+[Count Global Women Promotion to B1-B4]+0)
)

 

This is my test result.

v-lionel-msft_0-1617347683128.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

6 REPLIES 6
Vera_33
Resident Rockstar
Resident Rockstar

Hi @mmills2018 

 

Modify your measure a little bit, but it might return different value if you multi-select other groups combination

 

test women promos = 
VAR Selection = IF(HASONEVALUE('Snapshots (Prod)'[Management Level (groups)]), 
SELECTEDVALUE('Snapshots (Prod)'[Management Level (groups)]),
CONCATENATEX(VALUES('Snapshots (Prod)'[Management Level (groups)]),[Management Level (groups)]))

return

SWITCH(TRUE(),
Selection="M4+", [Count Global Women Promotion to M4+]+0,
Selection="M1-M3", [Count Global Women Promotion to M1-M3]+0,
Selection = "P1-P6", [Count Global Women Promotion to P1-P6]+0,
Selection = "M4+" & "M1-M3" &"P1-P6",[Count Global Women to Professional]
Selection = "01-04", [Count Global Women Promotion to O1-O4]+0,
Selection = "T1-T4", [Count Global Women Promotion to T1-T4]+0,
Selection = "B1-B4", [Count Global Women Promotion to B1-B4]+0,
( [Count Global Women Promotion to M4+]+[Count Global Women Promotion to M1-M3]+[Count Global Women Promotion to P1-P6]+[Count Global Women Promotion to O1-O4]+[Count Global Women Promotion to T1-T4]+[Count Global Women Promotion to B1-B4]+0))

 

Hi @mmills2018 ,


Please try this formula.

test women promos = 
VAR Selection = CONCATENATEX( 'Snapshots (Prod)', [Management Level (groups)], "," )
RETURN
SWITCH(
    TRUE(),
    Selection= "M4+", [Count Global Women Promotion to M4+]+0,
    Selection= "M1-M3", [Count Global Women Promotion to M1-M3]+0,
    Selection = "P1-P6", [Count Global Women Promotion to P1-P6]+0,
    Selection = "M4+,M1-M3,P1-P6",[Count Global Women to Professional]+0,
    Selection = "01-04", [Count Global Women Promotion to O1-O4]+0,
    Selection = "T1-T4", [Count Global Women Promotion to T1-T4]+0,
    Selection = "B1-B4", [Count Global Women Promotion to B1-B4]+0,
    ( [Count Global Women Promotion to M4+]+[Count Global Women Promotion to M1-M3]+[Count Global Women Promotion to P1-P6]+[Count Global Women Promotion to O1-O4]+[Count Global Women Promotion to T1-T4]+[Count Global Women Promotion to B1-B4]+0)
)

 

This is my test result.

v-lionel-msft_0-1617347683128.png

 

Best regards,
Lionel Chen

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Thanks! for some reason, it is still not picking up the multiple selection.  I changed my measure to only show one number if selected and its showing .14 instead of .15.  any ideas why?

 

VAR Selection = IF(HASONEVALUE('Snapshots (Prod)'[Management Level (groups)]),
SELECTEDVALUE('Snapshots (Prod)'[Management Level (groups)]),
CONCATENATEX(VALUES('Snapshots (Prod)'[Management Level (groups)]),[Management Level (groups)]))

return

SWITCH(TRUE(),
Selection="M4+", .12,
Selection="M1-M3", .12,
Selection = "P1-P6", .16,
Selection = "M4+" & "M1-M3" &"P1-P6",.15,
Selection = "01-04", .12,
Selection = "T1-T4", .12,
Selection = "B1-B4", .12,.14)

Hi @mmills2018 

 

Can you try to return the value of Selection when you do multi-selection? It worked here...

 

Vera_33_0-1617080562326.png

 

so weird, It is not working for me.  I am connecting two data tables, could that be the issue? but when i select one value it works just fine?

 

mmills2018_0-1617113845758.png

 

Hi @mmills2018 

 

Do you mind sending a sample .pbix? Sending you my email

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.