Forum Discussion
Request Help Optimizing Donut Chart
- 8 years ago
I hope this will do it
https://drive.google.com/file/d/1Yt2BYEM8mrM5IqVrC7PAFIN4TI64-Wk5/view?usp=sharing
Ok. I could suggest a solution close to what you want.
From your data set I added a new numeric column. Then I created a new summary table as below.
The visualisation from the new summary table is below.
As you can see the bar chart shows details in a meaningful way. The donut chart is not that useful when no filters is selected.
When you select an activity from the slicer, the donut chart is 'some what' useful but I cannot think of a way to display the selected activity from the slicer in donut chart label.
You can display a text filed with the selected activity an display at the top of the donut chart. Google for "power bi dynamic text on selection" and there is plenty of help ont his from experts.
May be this gives you some idea though it does not totally fulfill your requirements.
Hope it helps.
- parry2k8 years agoSuper User
Add two measures, one for selected value and another for others
Selected Activities = SUM(Table[Activities] Other Activities = CALCULATE(SUM(Table[Activities]), ALL(Table)) - [Selected Activities]
Drop donut chart and these two measures in the values.
- CoreyP8 years agoSolution Sage
This looks like what I'm looking for! Let me give it a go real quick!
Thank you! Stay tuned..
- anandav8 years agoSkilled Sharer
Your mesaures are a very simple way to do what I have suggested (replacing teh activity with hours). Very efficient solution (for me).
- CoreyP8 years agoSolution Sage
It's almost like I need to dynamically define what the "Other Total" should be...?
- CoreyP8 years agoSolution Sage
anandav,
That definitely gives me some food for thought! Thanks for working so hard and taking the time to provide such a detailed walkthrough with screenshots, that really helped me conceptualize what you were doing.
I want to post another example of what I'm trying to achieve in case I didn't explain it sufficiently before. So, my report is like this:
The bar chart shows the sum of labor hours, filtered by activity through the slicer, by week ending periods. The pie chart shows the sum of labor hours for the selected activity, versus, the sum of labor hours for all other activities. (A bonus would be if you clicked on a bar in the chart, it would filter the totals in the donut chart for just that week ending period)
Then when a user selects another activity from the slicer, the donut will show, again, the selected activity vs. all other. Like so:
It's almost like a "dynamic grouping" or something, I dunno.
What do y'all think?
- parry2k8 years agoSuper User
Did you tried the measures I posted here, I assume that will do it.
- CoreyP8 years agoSolution Sage
I tried what you said, but it doesn't work and I'm thinking I misunderstood what you said because what I'm doing doesn't seem logical.
Activity table:
Table Name: Activity
Column 1: Activity Number
Column 2: Activity
Labor table:
Table Name: Labor-ALL Activities
Column 1: Date
Column 2: Lastname, Firstname
Column 3: Activity
Column 4: Labor Hours
Column 5: Labor Cost
The measures I wrote:
Selected Activity = SUM(Activity[Activity]) (Which doesn't make sense to me, because you can't sum text)
Other Activities = CALCULATE(SUM(Activity[Activity]), ALL(Activity)) - [Selected Activity]
I probably did that all wrong, huh?
- anandav8 years agoSkilled Sharer
Not sure whether I am missing somthing but what you explained is what I have suggested - only the donut chart and slicer (igoniring other visuals for simplicity).
Selected acitivity hours vs. all other activity displayed as a % in the donut chart.
- parry2k8 years agoSuper UserIt can Be done for sure , can you share sample data for both tables in an excel sheet and I will send you the solution