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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. 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
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.