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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
Anonymous
Not applicable

Filter Values for Pie Chart

Hi,

 

I am looking for the a solution to the following:-

 

I want to create a pie chart to show 3 elements:-

 

1st Element to show values of projects worth 0-5 Million (data field is totalvalue)

2nd Element to show values of projects worth 5-20 Million (data field is total value)

3rd Element to show values of projects worth 20 Million and above (data field is total value)

 

Each project is identified with an individual project number (data field project number)

 

Thanks

 

 

1 ACCEPTED SOLUTION

@Anonymous ,

 

Ok, so it sounds like this can be done in Power Query on your Financial table. I presume this holds a [Project ID] field and a [Project Value] field or similar.

 

Based on that assumption, in Power Query select your Financial table query then go to the ribbon and select the 'Add Column' tab, and choose 'Custom Column'.

 

Use something like this in the 'Custom column formula' section of the dialog:

if [Project Value] < 5000000 then "0-5 Million" else
if [Project Value] < 20000000 then "5-20 Million" else
"20 Million +"

 

You would then use this field in the 'Legend' section of the visual set up.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




View solution in original post

7 REPLIES 7
msksenthil
Helper III
Helper III

@Anonymous Can you try with the calculated column option? 

BA_Pete
Super User
Super User

Hi @Anonymous ,

 

Can you provide a sample of your data please?

The method of achieving this will be different based on your data and structure.

 

Ta,

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Anonymous
Not applicable

Hi Pete,

 

Thanks. Yes sure. Here is my data below:-

 

Project Number is held in a table called Projects and Total Value is held in a table called Financial:-

 

Capture.PNG

 

Thanks

 

 

Cool, thanks. A coupe of questions:

 

Are you using Direct Query mode or Import mode for your data?

Is there only ever one row per project ID (in Power Query), or can project ID's repeat with the sum of [Total value] being their value?

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Anonymous
Not applicable

Hi Pete,

 

Thanks, so there is only 1 project number per value there are no duplicate project numbers. 

 

The date is being imported from another pbix file which hod our data set.

 

Thanks

 

Alex

@Anonymous ,

 

Ok, so it sounds like this can be done in Power Query on your Financial table. I presume this holds a [Project ID] field and a [Project Value] field or similar.

 

Based on that assumption, in Power Query select your Financial table query then go to the ribbon and select the 'Add Column' tab, and choose 'Custom Column'.

 

Use something like this in the 'Custom column formula' section of the dialog:

if [Project Value] < 5000000 then "0-5 Million" else
if [Project Value] < 20000000 then "5-20 Million" else
"20 Million +"

 

You would then use this field in the 'Legend' section of the visual set up.

 

Pete



Now accepting Kudos! If my post helped you, why not give it a thumbs-up?

Proud to be a Datanaut!




Anonymous
Not applicable

Hi Pete,

 

That worked great. I have applied this formula to the dataset and used this in my report and it works just how i need it to in the pie chart

 

Thanks very much for your help

 

Thanks

 

Alex

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.

Top Solution Authors