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

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

Reply
LanaPow
Regular Visitor

Need a slicer that will allow switching measure displayed in visuals

Is it possible to have a slicer that will show measures and not dimensions?

I have 4 visuals that display revenue measure, i.e. Revenue by country, Revenue by manufacturer, and so on. 

I would like to be able to switch that to say, Units or Price using a slicer. 

i.e. I'd select Units and all these visuals would show Units

Is it possible in Power BI?

 

1 ACCEPTED SOLUTION
PaulDBrown
Community Champion
Community Champion

@LanaPow 

 

Sure you can.

First you must create a new table (use "Enter Data" option from the ribbon), name the column, type in the values in each row ("Units" , "Price") and give the table a name.

In my example I've called the table "Price or Units Slicer" and the column within "Select"

Enter data.jpg

 

Make sure there are no relationships created with any other tables in your model.

My example looks like this:

Units price model.JPG

 

Now create the following measure to switch between the measures you wish to display based on the selection (I have [Average Price] and [Sum of Units] as my switch measures):

Units or Price = IF(SELECTEDVALUE('Price or Units Slicer'[Select]) = "Units"; [Sum of Units]; [Average Price])

 

Create a slicer on the page using the newly created column/table (in my case it is the "Select" column from the "Price or Units Slicer" table. (I suggest you make this slicer a single select to ensure either is always selected)

 

In the visual, use the measure you have just created ([Units or Price] in my example). 

 

And here is the result:

Price Selected.JPG

 

Units selected.JPG

 

 

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






View solution in original post

1 REPLY 1
PaulDBrown
Community Champion
Community Champion

@LanaPow 

 

Sure you can.

First you must create a new table (use "Enter Data" option from the ribbon), name the column, type in the values in each row ("Units" , "Price") and give the table a name.

In my example I've called the table "Price or Units Slicer" and the column within "Select"

Enter data.jpg

 

Make sure there are no relationships created with any other tables in your model.

My example looks like this:

Units price model.JPG

 

Now create the following measure to switch between the measures you wish to display based on the selection (I have [Average Price] and [Sum of Units] as my switch measures):

Units or Price = IF(SELECTEDVALUE('Price or Units Slicer'[Select]) = "Units"; [Sum of Units]; [Average Price])

 

Create a slicer on the page using the newly created column/table (in my case it is the "Select" column from the "Price or Units Slicer" table. (I suggest you make this slicer a single select to ensure either is always selected)

 

In the visual, use the measure you have just created ([Units or Price] in my example). 

 

And here is the result:

Price Selected.JPG

 

Units selected.JPG

 

 

 





Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!

Proud to be a Super User!
Paul on Linkedin.






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.

Top Solution Authors
Top Kudoed Authors