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.
you can use RGB() fucntion with IF clause. mention rgb values from any color format window.
e.g If(Sales>10, RGB(245,24,18), rgb(45,7,9)
use this in TeXT Color under the your expression
Above would give red color if Foreign Sales is selected or with no selection it would stay red color.
This will work only upon SELECTION in field.
It would be helpful if you tell us if it is a variable or measure or dimension?
Well if It's june, september, or november 2017 (maybe even 3.2..., I've forgotten..);
Create ur 2 measures as master measures:
when u use these new master measures; u'll find them colored as u want:
Thanks Madhur. but i dont have any other condition on my two variables (foreign sales and domestic sales) other than i want them in two different colors. No such condition as sales >10.
I have tried this If(Sales, RGB(245,24,18), rgb(45,7,9)) but it did not work.