Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
Please I need your help! I am trying to work with colors in a table.
I have two columns in a table, Category and Sales as shown in the attached image.
I want expression in Qliksense to do this .....↔️ if Sales corresponds to Cat1, apply the color of the cat1 (apply green for example);
Thanks in advance for your contributions.
Put a formula like this in the "backgroup color expression" or "Text Color expression" of your table:
if(Category='Cat1',green(),red())
Thank you very much@Micheledenardi for your quick reply,
Is it possible to display the colors in the Sales column only?
Yes, just specify the "backgroup color expression" or "Text Color expression" only in the Sales measure options
Applying this expression below, only function on the Category column on my end, the colour doesn't display on the Sales column. Am I doing something wrong?
if(Category='Cat1',green(),red())
And also, if I move this expression to the sales measure option, I have to edit it to something like this ... If(Sales = 100, green(),red()). But what I really want is to reference the Category column.
if you want to color measures by the value of sales you have to put something like this in your measure color expression:
if(sum(Sales)>140,green(),red())