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
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

Share with Power BI Enthusiasts: 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

Share with Power BI Enthusiasts: 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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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.