Forum Discussion

StuartSmith's avatar
StuartSmith
Icon for Power Participant rankPower Participant
6 years ago
Solved

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

  • Hi StuartSmith ,

     

    So you wanna get a result such as below?

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

    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!
     

     

     

4 Replies