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

Score big with last-minute savings on the final tickets to FabCon Vienna. Secure your discount

Reply
StuartSmith
Power Participant
Power Participant

Dynamic Pie Chart "Values" based on Radio Button Selection

I have a table with "City", "5G", "eSim", etc and would like to create a pie chart that has "City" as the "Legend" and would like the "Values" field of the pie chart to be populated by a "Radio Button", "Slicer", etc that would contain the table headings "5G", "eSim", etc. so depending on the radio button selection, would depend on what data the pie chart would show.  So in other words a dynamic chart.  Is this possible?

Thanks in advance

1 ACCEPTED SOLUTION

Hi @StuartSmith ,

 

So you wanna get a result such as below?

Annotation 2020-08-06 110941.png

If so,go to query editor>select column "city">"unpivot columns">"unpivot other columns",and you will get a new table as below:

Annotation 2020-08-06 111224.png

Then back to report view,create a measure as below:

Measure = CALCULATE(COUNT('Table'[City]),FILTER('Table','Table'[Value]="Yes"))

 

See attached for the related .pbix file.


 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
 

 

 

View solution in original post

4 REPLIES 4
amitchandak
Super User
Super User

@StuartSmith ,

Dynamically change chart axis/legend in Power BI
https://www.youtube.com/watch?v=6jeSIRpjv0M

 

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

 

https://docs.microsoft.com/en-us/power-bi/power-bi-slicer-filter-responsive

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
Pragati11
Super User
Super User

Hi @StuartSmith ,

 

You will have to share some sample data for us to comment further if this is achievable based on your data structure or not.

 

Thanks,

Pragati

Best Regards,

Pragati Jain


MVP logo


LinkedIn | Twitter | Blog YouTube 

Did I answer your question? Mark my post as a solution! This will help others on the forum!

Appreciate your Kudos!!

Proud to be a Super User!!

@Pragati11 sample data would simply be...

 

City

5G AvailableeSIMVoLTEVoWiFi
LondonYesNoYesYes
New YorkYesYesYesYes
ParisYesNoNoNo
MadridNoYesYesNo
     

 

Then would like a pie chart with "City" for the pie chart "Legend" field, leaving the pie chart "Values" field empty and populated by whatever was selected from the selection of radio buttons or check boxes with "5G Available", "eSIM", "VoLTE" and "VoWiFi". So if the user select "5G" the chart would show 5G data for each city, and if "eSim" was selected it would show "eSim" data.

 

Hope that makes sense.

 

Hi @StuartSmith ,

 

So you wanna get a result such as below?

Annotation 2020-08-06 110941.png

If so,go to query editor>select column "city">"unpivot columns">"unpivot other columns",and you will get a new table as below:

Annotation 2020-08-06 111224.png

Then back to report view,create a measure as below:

Measure = CALCULATE(COUNT('Table'[City]),FILTER('Table','Table'[Value]="Yes"))

 

See attached for the related .pbix file.


 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!
 

 

 

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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