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
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?
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?
- parry2k8 years agoSuper User
no you are right, what you trying to show in donut chart?
Total Activities or Total Hours?
Didn't read your thread in detail but I just posted the solution but what you are trying to do is not something which cannot be done.- CoreyP8 years agoSolution Sage
Total hours.
So,
Total Hours = SUM(Labor-ALL Activities[Labor Hours])
Then, when the slicer filters per activity, it would become:
Total Hours of "Selected Activity" = CALCULATE([Total Hours], Activity[Activity] = "Selected Activity")
...where "Selected Activity" is Data Entry, or Dimming, or whatever.
I want my donut chart to show:
Total Hours of Selected Activity vs. Total Hours
For instance, if the total hours equals 73,660, and Data Entry is 22,740, the donut chart would show Data Entry as 31% of Total Labor.
Does this make sense, or are you saying that this cannot be done?