cancel
Showing results for
Did you mean:
Helper III

## Total count and percentages in Pie Chart

I have data on the left, there are Project Numbers at the beginning. The pie chart on the right side is what i need to do. It should show total number of Project Numbers and which group they belong to. I have created a Group using a New Table, that I entered the data into, not connected to anything. Here...

Then i created a calc for Margin Range Totals,

Margin Range Totals = VAR CurrentPrice = [Total Margin%]
VAR FilterSegment =
FILTER (
'Project Margin Grouping',
AND (
'Project Margin Grouping'[Min] < CurrentPrice,
'Project Margin Grouping'[Max] >= CurrentPrice
)
)
VAR Result =
CALCULATE (
DISTINCT ( 'Project Margin Grouping'[Group]),
FilterSegment
)
RETURN
Result

I want to somehow figure out how to get a count of Projects and which group they land in.  The Group Table seems to work as expected. but there are blanks as you can see here and not sure why it doesnt take out all others and keep in only those i selected in the Group filter.
This is what it should look like

9 REPLIES 9
Community Support

Hi @Kornholio ,

For pie chart visual, when the fields are placed in different positions, without external slicer filtering, visual displays the percentage of each count. When a certain data of the slicer is selected, the pie chart visual will interact with it.

like below:

If the problem is still not resolved, please provide detailed error information and let me know immediately. Looking forward to your reply.

Best Regards,
Henry

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

Helper III

Hi, This doesnt help my situation though. I need the chart to show the percentage of those groups (>40%, 30-30%, etc) within each slice. So as you can see above, >40% is 51% of the total in the groups.

Community Support

Hi @Kornholio ,

According to your needs, I did a test. For donut chart, its calculation logic is a single value/total value, displayed in different areas. When using an external slicer as the filter condition, the total value becomes the value of the filter condition, so the displayed percentage is always 100%, which cannot achieve the result you want to display.

So you can post your idea here may hope to help you solve the problem as soon as possible.

Best Regards,
Henry

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

Helper III

Hi Henry, Can you send me your example with calcs? That will probably help me,thanks

Helper III

Hi Henry,

Can i get the calcs used in the first graph from previous response, that should work for me i think?

Community Support

Hi @Kornholio ,

Here is my sample pbix file link.

If the constructed data model is wrong, can I provide the correct pbix file so that I can answer it for you as soon as possible.

Best Regards,

Henry

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

Helper III

@v-henryk-mstf wrote:

Hi @Kornholio ,

Here is my sample pbix file link.

If the constructed data model is wrong, can I provide the correct pbix file so that I can answer it for you as soon as possible.

Best Regards,

Community Support

Hi @Kornholio ,

I don’t quite understand what you mean, but the file link can’t be opened?

Best Regards,
Henry

Helper III

hi, in your file you just put in a new table with the groups in one column and fake amounts in the other. This doesnt really help me though. There are no calcs in here to do what i need. I can write my own fake tables, but i need to have a calc that takes the Total Margin%, like I have and then i created a table for the %'s. I can get the table to work in the image above on the left, when i click on a % grouping it shows this.

As you can see the groupings show, but there are blanks, therefore it wont count the # of project_ids in the chart

Announcements

#### Microsoft Build is May 24-26. Have you registered yet?

Come together to explore latest innovations in code and application development—and gain insights from experts from around the world.

#### The Power BI Community Show

Welcome to the Power BI Community Show! Jeroen ter Heerdt talks about the importance of Data Modeling.

#### Check it out!

Mark your calendars and join us on Thursday, May 26 at 11a PDT for a great session with Ted Pattison!

#### Charticulator Design Challenge

Put your data visualization and design skills to the test! This exciting challenge is happening now through May 31st!

Top Solution Authors
Top Kudoed Authors