Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi, I have a bar chart displaying two variables, Foreign Sales and Domestic Sales that I draw one next to the other per product.
I am trying to have each one in different color and i tried the following under Colors and legend, Colors custom, By expression:
if('Foreign Sales', red() ,if('Domestic Sales', green()))
But the above did not work. Any suggestion how to fix this code please?
Thanks very much.
both are measures. what difference does that make please ?
i tried your suggestion, but both bars look red though !!
Thanks Omar. i tried this, and in defining the measure you can select its color. that worked. Thanks again.
Good; if your question has been answered; then close the thread please by marking the correct answer as correct.
To change color for your variable, you'd need to give some number
Ex:
if($(Foreign Sale)>1000,red(),
if($( Domestic Sales)>1000,green()))
The number can be anything as it is a color by expression. You can color it by Dimension without giving any values to it.