Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Sorting a Stacked bar chart based on total Value

I have this Stacked bar chart in my Dashboard where I have to sort the chart based on the values ie. 67.44,94.83,112.40....

However, the problem I'm encountering is, It's getting sorted either on the basis of First Expression value (the light colored part) or based on the Dimension.

Capture.JPG

Would be helpful if someone can throw some light on this.

Thanks.

1 Solution

Accepted Solutions
tresesco
MVP
MVP

Instead of '+' addition use RangeSum(), like:

RangeSum(Exp1, Exp2, Exp3)

View solution in original post

10 Replies
Not applicable
Author

Select sort tab under the chart properties and check Y-value option keeping Ascending order in selection.

lironbaram
Partner - Master III
Partner - Master III

hi

in the chart properties

go to the sort tab

check the box sort by expression

and insert your expression in the whit space

select sort in descending order

er.png

Anonymous
Not applicable
Author

Thanks for your reply. I tried that already. However that result yields a chart like thisCapture.JPG

You can clearly see 3 bars with 2 stacks are not sorted.

Kushal_Chawda

Go to sort sort tab.

In expression, put below expression

=(Expression1+Expression2)

and select descending

Kushal_Chawda

please share the sample if possible

lironbaram
Partner - Master III
Partner - Master III

well

this method works for me usually

is your dimension a field or calculated ?

if you put the expression you used to sort in a table with the same dimensions do you get the correct results?

Anonymous
Not applicable
Author

You were spot on Liron.

1. Field is used as Dimension here.

2. However, when I checked the expression in a table those values were missing.

Reason I can guess is, one of the expression(among the 3) I used is not associated with that field value. Question is, Is there any hack to get it sorted along with other values?

tresesco
MVP
MVP

Instead of '+' addition use RangeSum(), like:

RangeSum(Exp1, Exp2, Exp3)

lironbaram
Partner - Master III
Partner - Master III

hi

can you post your expression ?