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
rcardozo
Regular Visitor

Pie Chart Data

Hi

Is there a way that i can present my data so it  has the categories as the legend, and totals agree/Strongly agree in the pie graph?

Recruitment Process Feedback.png

2 ACCEPTED SOLUTIONS

@rcardozo

 

First, you need to transform your data:

 

Go to Edit Query, Select all the columns and Go to Transform - Unpivot Columns

 

Change the name of columns like you want. 

Close & Apply

 

Create a Chart

 

Legend-Answer

Details-Type

Values-Count of Answer

 

Other alternative Chart

 

Legend-Type

Details-Answer

Values-Count of Answer

 

 




Lima - Peru

View solution in original post

To Sort the Answer, create a conditional column (Edit Query) :

 

If Answer is

Agree 1

Strongly Agree 2

Disagree 3

Strongly Disagree 4

 

Cond.png

 

Close & Apply

 

Select the column Answer in your fields panel and go to modeling Sort By Column: Thenameofyourconditionalcolumn

 




Lima - Peru

View solution in original post

13 REPLIES 13
Bokazoit
Continued Contributor
Continued Contributor

Switch the fields?

This is what my Visualisation pane and my data looks like, but i'm not sure how to do this:

Recriutment Feedback Data.pngVisualisation Pane.png

@rcardozo

 

First, you need to transform your data:

 

Go to Edit Query, Select all the columns and Go to Transform - Unpivot Columns

 

Change the name of columns like you want. 

Close & Apply

 

Create a Chart

 

Legend-Answer

Details-Type

Values-Count of Answer

 

Other alternative Chart

 

Legend-Type

Details-Answer

Values-Count of Answer

 

 




Lima - Peru

Hi Guys,


Thanks for all your help so far. I think i'm almost there.

 

Not sure if i am doing something wrong or missing a step, but this is the chart that I get:

Pie Chart.png

Hi @Bokazoit, @Vvelarde@v-huizhn-msft

 

Thanks for all your help. I think i've figured it out.

 

I've now presented the data into a stacked bar graph. i just havent figured out how to change the order of the legend, but i'm pretty happy with the result.

 

Thanks again for everyone's help!

 

Stacked Bar Graph.png

To Sort the Answer, create a conditional column (Edit Query) :

 

If Answer is

Agree 1

Strongly Agree 2

Disagree 3

Strongly Disagree 4

 

Cond.png

 

Close & Apply

 

Select the column Answer in your fields panel and go to modeling Sort By Column: Thenameofyourconditionalcolumn

 




Lima - Peru

Thanks so much Victor!

 

This works perfectly! 🙂

Hi @rcardozo,

In the Pie Chart, the different colour sectors(like the Red, Yellow, Green, Black) display there are four dategoreis in your Answer field. For each sector, there are multiple sub-sectors based on your Type field. If the result is what you want?

Best Regards,
Angelia

Bokazoit
Continued Contributor
Continued Contributor

You need to transform the data into something like this:

 

Table.JPG

 

Then You get this:

 

Pie.JPG

Thanks so much.

I'm very new to BI. How would i go about doing this? Is there a way to combine all the agrees etc in the pie graph?

 

 

Bokazoit
Continued Contributor
Continued Contributor

Like this?

 

Pie2.JPG

 

You need to do it either in SQL or manually. Perhaps using Pivot/Unpivot in SQL or Pivot in Excel can do the job.

That is exectly how i need it!

 

What are the steps that i need to take in order to get this result. Sorry, i'm a bit of a novice.

Bokazoit
Continued Contributor
Continued Contributor

Build the table as I showed above, and then:

 

Pie3.JPG

It is a danish version of Power BI :roll: I change it soon, but Værdier = Values and 'Antal af Evaluation' = 'Count of Evaluation'

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.