Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi there,
I am trying to colour the country map chart based on the values using the expression below. What I want is if the values are greater than 0 but less than 2 then Green colour, if the values are >2 and <5 then Yellow Colour and if the values are > 5 then countries with these values should change to Red colour on Map Charts however it's not working. Can someone please help, Many thanks.
if(Sum(Sales) > 5.0, RGB(255,0,0),if(Sum(Sales) > 2.0, RGB(255,191,0),if(Sum(Sales) > 0.0, RGB(255,191,0))))
Hi, I suppose the last color is just a typo, the rgb should be green but that code is for yellow.
I tried that expression in a map and it's working, in data->dimension, and in location->field, the dimenson is the country; and in Colors I selected 'by expression' and set that expression, and check the 'expression is a color code' checkbox.
With some dummy values created that meet the requirements the colors are the expected.