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
Andrew_BI
New Member

How do I create a pie chart with the % of values over/under a defined value?

Hi all,

 

I have a database that contains data about computers and how many updates are needed to be installed on them. Basically like the table below:

 

Name            #of_Updates_needed

ComputerA   100

ComputerB   10

ComputerC   80

ComputerD   20

ComputerE    0

 

I can create a bar chart visual that highlights computers over a set minimum and maximum value (e.g. 10 and 50) using the color saturation option, but I would like to create a pie chart visual that shows the % of computers that need more than 50 updates and the % of computers that need less than 10 updates. Can anyone please assist? 

1 ACCEPTED SOLUTION
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @Andrew_BI,

 

Please add the following calculated column to your table

 

Category = SWITCH(TRUE() , 'Data'[#of_Updates_needed] > 50 , "50 or More" , 'Data'[#of_Updates_needed] < 10 , "Less than 10" , "Other")

Then create the following Calculated Measure

 

Percentage Measure = DIVIDE( CALCULATE(COUNTROWS('Data')) , COUNTROWS(ALL(Data)))

Then create your pie visual as follows

 

pie.png

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @Andrew_BI,

 

Please add the following calculated column to your table

 

Category = SWITCH(TRUE() , 'Data'[#of_Updates_needed] > 50 , "50 or More" , 'Data'[#of_Updates_needed] < 10 , "Less than 10" , "Other")

Then create the following Calculated Measure

 

Percentage Measure = DIVIDE( CALCULATE(COUNTROWS('Data')) , COUNTROWS(ALL(Data)))

Then create your pie visual as follows

 

pie.png

 


To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

This worked exactly as desired. Thanks Phil! 

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.