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
anbeegod
Frequent Visitor

Create a chart that shows data based on selected column

Hi, I'm switching from Spotfire to Power BI and replicating my previous Spotfire work as training.

 

One function I'm not quite sure how to do is to show data based on a selected column.

 

Example below from my Spotfire dashboard:

anbeegod_0-1639127700818.png

I can select PM Rating, Career Level, Generation, Country, Tenure etc. and display the turnover % based on its values.

 

For example, I can select PM Rating in the dropdown list, and the KPI would display the turnover % of all PM Rating values (i.e. 1, 1L, 1M, 1H etc).

 

If I select country in the dropdown list, the KPI would show the turnover % of all countries (eg. Australia, China).

 

 

In Power BI, I'm trying to create a chart that shows headcount change by the selected column.

For example, if I select country, it would use country as the legend; if I select gender, it would use gender as the legend.

anbeegod_0-1639128373747.png

 

 

How could I do this or something similar in Power BI?

Thank you in advance for any help.

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @anbeegod ,

 

DAX cannot read the column name, so in Power BI you will need to convert the columns into rows by using unpivot feature. Then use Attribute as slicer and Value.1 as legend.

1.PNG2.PNG3.PNG4.PNG

 

Best Regards,

Jay

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @anbeegod ,

 

DAX cannot read the column name, so in Power BI you will need to convert the columns into rows by using unpivot feature. Then use Attribute as slicer and Value.1 as legend.

1.PNG2.PNG3.PNG4.PNG

 

Best Regards,

Jay

amitchandak
Super User
Super User

@anbeegod , If you need dynamic axis with slicer, You need to biikmar or unpivot the columns

 

Dynamically change chart axis in Power BI
bookmark -https://blog.crossjoin.co.uk/2018/04/20/dynamically-changing-a-chart-axis-in-power-bi-using-bookmarks-and-buttons/
https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive
https://www.youtube.com/watch?v=6jeSIRpjv0M
https://datamonkeysite.com/2020/10/22/change-dimension-dynamically-using-parameter-in-powerbi/

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

Helpful resources

Announcements
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