Forum Discussion
Anonymous
10 years agoNot applicable
Sort 100% Stacked Column Chart by Percentage Values
In my Power BI Desktop file, I'm using the 100% Stacked Column Chart to compare 2 values for 10 people and the only options to sort the bars are: x-axis value (person's name) Value 1 of the bar ch...
- 10 years ago
Okay I got the %s you say in the Post above - and they calculate exactly as you say!
However we were there before with the calculated columns only - those were producing the same results?
And you said they were wrong?
Anonymous
10 years agoNot applicable
Nice! Thanks Sean.
My data is like this:
Each Developer records their time by Category. I created the following 2 Calculations:
Story Duration in Minutes = IF('Dev Time Tracking'[Category] = "Story", IF('Dev Time Tracking'[Start] >= 'Dev Time Tracking'[End], 0, DATEDIFF('Dev Time Tracking'[Start], 'Dev Time Tracking'[End], MINUTE)), 0)
Non-Story Duration in Minutes = IF('Dev Time Tracking'[Category] = "Story", 0, IF('Dev Time Tracking'[Start] >= 'Dev Time Tracking'[End], 0, DATEDIFF('Dev Time Tracking'[Start], 'Dev Time Tracking'[End], MINUTE)))Is there a better way to write those Calculations?
Either way, my 100% Stacked Column Chart has:
- Axis = Developer
- Value
- Non-Story Duration In Minutes
- Story Duration In Minutes
Sean
10 years agoCommunity Champion
Anonymous
Create these 2 Measures
Story Durations = SUM('Dev Time Tracking'[Story Duration in Minutes])
Non-Story Durations = SUM('Dev Time Tracking'[Non-Story Duration in Minutes])then create your chart as in the picture => placing these 2 Measures in the Values area
then sort... Let me know if it works!