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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Orcorcorco
New Member

How to show in a pie chart a percentage from two column values

Hi - Can someone help me with this concern?

I have columns. One is Total Employees and the other is Total Responses.

I want to be able to show a chart that will show me the percentage of Total Responses / Total Employees and not adding a column in the data source anymore.

 

Illustration:

Total Employees      Total Responses

1000                         900

 

I wanted to use a pie chart which should look like this.

Orcorcorco_0-1594722432081.png

Thanks

 

 

1 ACCEPTED SOLUTION
v-yingjl
Community Support
Community Support

Hi @Orcorcorco ,

Based on your description, you can create two measures and put them in the values field in Dount chart.

responses = SUM('Table'[Total Responses]) / SUM('Table'[Total Employees]) 
other = (SUM('Table'[Total Employees]) - SUM('Table'[Total Responses])) / SUM('Table'[Total Employees])

Set the Label style as 'Percent of Total' and Label position as 'Inside' under Detail labels menu, you will get your expected result:

left is a pie chart, right is a dount chartleft is a pie chart, right is a dount chart

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

3 REPLIES 3
v-yingjl
Community Support
Community Support

Hi @Orcorcorco ,

Based on your description, you can create two measures and put them in the values field in Dount chart.

responses = SUM('Table'[Total Responses]) / SUM('Table'[Total Employees]) 
other = (SUM('Table'[Total Employees]) - SUM('Table'[Total Responses])) / SUM('Table'[Total Employees])

Set the Label style as 'Percent of Total' and Label position as 'Inside' under Detail labels menu, you will get your expected result:

left is a pie chart, right is a dount chartleft is a pie chart, right is a dount chart

Best Regards,
Yingjie Li

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@Orcorcorco , In pie visual you have option Label Style, You can choose Percent of Total and position inside.

 

do not drag any legend or details. only use measures under "values".

 

You can refer

https://www.goskills.com/Microsoft-Office/Articles/Power-BI-pie-chart

calerof
Impactful Individual
Impactful Individual

Hi @Orcorcorco,

 

If  a dataset like the following is your case

ResponseRateData.png

You could use this measure:

EmployeeResponded = 
CALCULATE( COUNT(ResponseRate1[Response]), ResponseRate1[Response] = 1)

 And another for negative responses, and you would get something like this:

ResponseRate.png

 

Hope it helps.

Regards,

Fernando

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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