Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Dear All,
I've created Stacked Bar Charts and been trying to find a way in which I want to sort the charts.
I have some office branches on the dimension axis and sales amount of each branch on the expression axis. The total sales amount consists of product A, B, C, D which are expresed in percentages. (The total becomes 100%)
Is there a way to sort this chart in order by the value of A, B, C or D of descending?
Hi OGA,
the formula has to be:
=aggr(sum({$ <Product={A}>}Sales),Branch, Product)/sum(TOTAL<Branch>Sales)+aggr(sum({$ <Product={B}>}Sales),Branch, Product)/sum(TOTAL<Branch>Sales)
Have Fun
Alex:)
You want to sort the Stacked Bar chart according to the Product A,B,Cor D. You can go to the Chart Properties and then the Sort tab , Select the Expression and write the expression with which you want to sort it.
Hi Silky
Thanks for your response. You are right, but I want to know the correct way of expression to sort it....
Ok.. can u post the sample data here so that i can guide you in a better way....!!
or you can try with the same expression that you have used for the Chart.....see if that works !!
Hi OGA,
the formula has to be:
=aggr(sum({$ <Product={A}>}Sales),Branch, Product)/sum(TOTAL<Branch>Sales)+aggr(sum({$ <Product={B}>}Sales),Branch, Product)/sum(TOTAL<Branch>Sales)
Have Fun
Alex:)
Hi Alex,
It worked!!!! This is a great help. I really appreciate it!!!
And this makes me have another question..
Can this formula be applicable to other stacked bar charts? In this case, I have to write product name A and B in the formula and not applicable to other charts whichi don't includes A nor B...
I guess it would be possible if I use some variables,,,, but I wonder how...