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
Red217
Helper III
Helper III

Using a slicer to select multiple values

Hello, 

i have been using Slicers with SELECTEDVALUE and SWITCH to select different measurements based on the slicer selection, works great BUT, can only make it work for 1 selection.

 

in my cas i have 4 measurements, for example:

measure1 = 100

measure 2 = 200

measure 3 = 300

 

i want a slicer that when i select "measure1" AND "Measure2" it will give me the SUM of the value of both of them, so the value will be "300" in our example.

* i am trying to create the behavior of toggle switch in which when toggling you control whatever that measure is in the "total sum" calculation or not.

 

please help 😉

 

 

1 ACCEPTED SOLUTION
wdx223_Daniel
Super User
Super User

=SUMX(VALUES(Slicer[Value]),SWITCH(Slicer[Value],1,[Measure1],2,[Measure2],3,[Measure3],0))

View solution in original post

3 REPLIES 3
wdx223_Daniel
Super User
Super User

=SUMX(VALUES(Slicer[Value]),SWITCH(Slicer[Value],1,[Measure1],2,[Measure2],3,[Measure3],0))

Small follow up, if i have no selection, I cant get it to show "0", I want a case in which if I didn't select anything it will show a zero but currently its showing the sum of all the measures.

this is my formula ( as you written) , what am doing wrong ? :

 

_DevTestSlicerSum = SUMX( VALUES('Dev Slicer'[Column1]), SWITCH('Dev Slicer'[Column1], "Select1",sum('Table1'[Column1.test1]), "Select2",sum('Table1'[Column1.test2]), "Select3",sum('Table1'[Column1.test3]), "Select4",sum('Table1'[Column1.test4]),0))

 

Thank you so much!, exactly what i needed!

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.