Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I am trying to write a function that would do background colorization, for example:
1. If the attribute value is more than 90, color the cells red
2. If the attribute value is more than 75 and less than 90, color the cells orange
I wrote this:
if([attribute] > 75 and [attribute] < 90,'orange', if([attribute] > 90, 'red', 'white'))
The first part of the function to color the cells orange is not working, I am only getting red color. I made some tests and basically Qlik is not taking into account my function when I write "AND".
Does someone have any idea how to do it? Should be simple but I couldn't find an answer online.
Thanks in advance!
Is attribute a field? Most probably you need to add some aggregation here (sum/count/etc)
Hello,
The attribute is just from the data manager but not used as a field in the table. Not sure how could I add aggregation?
Are you planning to use this color expression where in your sheet? Table, KPI?
It's a table with columns and rows and a measure (SUM) that is populating the table cells. However, the table cells should have background colorization not based on the measure (SUM) that is showing in the cell but rather based on an attribute that is not present in the table, only in the data manager.
Just for testing purpose, could you add two measures?
Sum([attribute]) and
Avg([attribute])
Hello,
I added, it's still not working.
Which values are you seeing on those columns?
I guess [attribute] is a number, right?
Hi @Hana88
Check using this link of the chart you are using is supported for multi-colors.
Kind regards.