cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Kornholio
Helper III
Helper III

Total count and percentages in Pie Chart

Kornholio_0-1614636241246.png

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...

Kornholio_1-1614636478330.png

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
 
 
Kornholio_0-1614636736550.png

 

 

 

 

 
 

 

 

 

9 REPLIES 9
v-henryk-mstf
Community Support
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:
v-henryk-mstf_0-1614838055289.pngv-henryk-mstf_1-1614838067258.png
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.

 

 

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.

 

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.

1.PNG

4.PNG

 

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.

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

Hi Henry,

 

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

 

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.

 


@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,

 

 


 

Hi @Kornholio ,

 

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

 

link.

Best Regards,
Henry

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.  

Kornholio_0-1615561400244.png

 

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

 

Helpful resources

Announcements
PBI User Groups

Welcome to the User Group Public Preview

Check out new user group experience and if you are a leader please create your group

April Update

Check it Out!

Click here to read more about the April 2021 Updates!

MBAS Carousel

Sign up for our May 4th event!

May the fourth be with you, join us online!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.