Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I have the following 2 variables: Population and Density (Population / km2), and I'd like to visualize them using bar chart in Power BI. Instead of dragging and dropping variables manually into the value property of the chart, I'd like to accomplish this variable swap using some other user-friendly technique.
Should I introduce an action button (action on button click) or is there any more common way around?
Here is a demonstration of the problem:
Thank you in advance!
Solved! Go to Solution.
Hi. There are some ways to do this. The most friendly might be bookmarks. Check this post using a toggle to change between matrixs. You can do it with this two bar charts. A bookmark to show or hide it:
https://blog.ladataweb.com.ar/post/186651845708/bookmarks-t1e1
If you don't like the toggle you can use button including a painted selected like this:
https://blog.ladataweb.com.ar/post/624889654552018944/powerbi-bookmarks-mejora-la-ux-para-botones
On the other hand you can create a table with the two options as rows (density and population). Then use in "values" a measure that asks:
IF ( SELECTEDVALUE ( Table[column], "Density") = "Density" , [Density], [Population])
That way you can add the column from that small table as slicer to change between those values for the bar chart.
Hope one of those help
Happy to help!
Hi. There are some ways to do this. The most friendly might be bookmarks. Check this post using a toggle to change between matrixs. You can do it with this two bar charts. A bookmark to show or hide it:
https://blog.ladataweb.com.ar/post/186651845708/bookmarks-t1e1
If you don't like the toggle you can use button including a painted selected like this:
https://blog.ladataweb.com.ar/post/624889654552018944/powerbi-bookmarks-mejora-la-ux-para-botones
On the other hand you can create a table with the two options as rows (density and population). Then use in "values" a measure that asks:
IF ( SELECTEDVALUE ( Table[column], "Density") = "Density" , [Density], [Population])
That way you can add the column from that small table as slicer to change between those values for the bar chart.
Hope one of those help
Happy to help!
Thank you so much! 😁
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.