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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
PorterSmash
Regular Visitor

Choose a COLUMN to be used in a visual with a slicer

In short: I want to (effectively) choose the COLUMN within any given visual by using a slicer or parameter. [End]

My specific situation "in long": Let's say I have Map visual. For the location data field, I have a column that contains zip codes. I have another column in the table that tells whether that Zip code is closer to New York City, or if that Zip code is closer to Los Angeles. I have another column in the table that tells whether the Zip code is closer to New York City, or if it is closer to Dallas Texas. Like this:

Zip NYC or LA NYC or Dal
23158 NYC NYC
36821 LA DAL
18632 NYC DAL

 

I want the bubble representing the zip code to change color based on which city is closest. So I can put "NYC or LA" in the Legend spot on my visual, or I can put "NYC or Dal" in that spot. But I cannot put both. I want to be able to switch between the two using a slicer or parameter. So the Zip 18632 would change color after changing the slicer. [End]

I know you can do something SIMILAR to this using measures. Specifically, the SELECTEDVALUE() function. However, I need a row by row value. Context can be applied automatically when used in the correct visual, but I need a Map.

I attempted this tutorial. But despite the title, it just doesn't work for columns.

https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...

 

I am open to any ideas. If it would work by using a single column "NYC or NEW" and the column could be re-evaluated based on a slicer, that would work. The data is completely open to modification.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@PorterSmash 

 

Check if field parameters can help

 

Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9af...
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f

 

Power BI- Create dynamic slicers using field parameters: https://youtu.be/H2ZxWaHAJZQ

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

2 REPLIES 2
amitchandak
Super User
Super User

@PorterSmash 

 

Check if field parameters can help

 

Power BI Field Parameters — A Quick way for Dynamic Visuals: https://amitchandak.medium.com/power-bi-field-parameters-a-quick-way-for-dynamic-visuals-fc4095ae9af...
Power BI Field Parameters- Measure Slicer and Axis/Dimension slicer: https://youtu.be/lqF3Wa1FllE
Switch TOPN with Field Parameters: https://amitchandak.medium.com/switch-topn-with-field-parameters-299a0ae3725f

 

Power BI- Create dynamic slicers using field parameters: https://youtu.be/H2ZxWaHAJZQ

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

This does exactly what I'm asking for. I looked at this exact thing and thought it didn't work. I have no idea how I missed it. Thank you for removing the wool from my eyes.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.