Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi
I'm using the Adventureworks database and trying to set up the following bar chart:
Sales Amount by StateProvince Name, each bar colored by the top Occupation calculated as highest average Sales.
I expect to see a bar chart with each bar colored in one of the 5 colors corresponding to the 5 values in the Occupation dimension.
I was able to create an expression which brings me the top occupation using firstsortedvalue:
firstsortedvalue(EnglishOccupation,-Aggr ((sum($(vSalesUSD))/Count(CustomerKey)), EnglishOccupation, StateProvinceName))
However I can't make this same expresion work as a color differentiator in the Bar chart. What am I missing?
The expression works as expected in a simple table:
Something like this?
any ideas?
Not giving up on this, any ideas if this can be achieved and how?
Thanks!
What is the exact expression you are using for your color expression?
That's the problem, I don't know how I should use the above expression, which brings me correct results, for the color by expression field. I tried using it as it is and I only get grey bars...
Thanks for looking into this
Would you be able to share a sample?
Here it is. The first sheet should be self explanatory. I want to have the first chart colored by the English occupation, as the data shows in the table in the lower right side.
Everything else seems to be working ok.
Something like this?
exactly
I have attached the sample back with my last response for you to take a look at