Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I have a bar chart that shows the sales by Country.
What I would like to do is show the highest sales country in a different colour.
So for example show the country with biggest sales in Green, and everything else in Blue.
How can I achieve this?
Dimension is Country
Measure is Sum(Sales)
I thought to get the biggest sales country name value by doing FirstSortedValue(Country, -Aggr(Sum(Sales), Country)
And then use it in an IF statement for Colour By Expression. E.g. If(Country = <OutcomeOfFirstSortedValueExpresison>, Green, Blue)
But it does not work.
May be you can try this
If(Sum(Sales) = Max(TOTAL Aggr(Sum(Sales), Country)), Green(), Blue())
Or your way would be this
If(Country = FirstSortedValue(TOTAL Country, -Aggr(Sum(Sales), Country), Green, Blue)