New to Qlik Analytics

If you’re new to Qlik Cloud or Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!

Who Me Too'd this topic

Drake
Contributor
Contributor

Background color expression

Hi,

I have a table in Qlik Sense with several fields, most using average expressions and some using sums. We need to apply background color expressions to these fields, with colors being green and red. For example, for the field "Average days to pay", if the value is greater than 3, it should be red, and if it is 3 or less, it should be green. I am currently using this expression:

IF(company = 'xyz' and Avg([Average days to pay])<=3, 'green')&

IF(company = 'xyz' and Avg([Average days to pay])>=3, 'red')

However, this isn't working because the average value (e.g., 3.48) is being rounded to 3 in the sheet. I've amended the expression to:

IF(company = 'xyz' and Avg([Average days to pay])<=3.49, 'green')&

IF(company = 'xyz' and Avg([Average days to pay])>=3.50, 'red')

This works, but with many columns to amend and i have many companies in single column, I’m looking for a more efficient solution. Any suggestions?

 

many thanks in advance

Labels (4)
Who Me Too'd this topic