Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello!
I have a pivot table in Qlik that includes a Percentage column. The percentage column is calculated based on other columns in the table.
I want this column to color code based on the returned result (above 70% should be GREEN and below should be RED).
Below is my expression, but I am receiving an error.
Any help is greatly appreciated! Thank you!
@AO1
You use column(), as already mentioned, as in this example assuming that your column is 1, then:
if(Column(1)<'0.7',green(),blue())
From the label, you can do like:
if([Productivity Percentage]<'0.7',green(),blue())
This will return an expression error, but it can be applied in the same way.
Or using your measurement as already said.
Note: see that the percentage was assigned with a . (point) 0.7
- Regards, Matheus
Hello,
In a pivot table, you can use 'Text color expression' in your measure options. For example, my current measure is Sum(LancementTotal) and my color expression is if(sum(LancementTotal)>2000,green(),red())
Hi-- thank you! I was using the Text Color Expression field, but I edited my expression to read as below and Qlik is no longer throwing an error, however, the numbers in the pivot table are still not showing green for anything over 70%.
Is there a different way you would write this expression for 70%?
Thank you!
Hello,
If your value is in percentage you must mark 0.7 and not 70
If it still does not work you can use your measure directly rather than the column() function
Thank you! I changed it to 0.7, but the colors are still not showing up correctly. Can you explain how I would measure directly? What would the expression look like for that?
Thank you so much- I so appreciate this help!
@AO1
You use column(), as already mentioned, as in this example assuming that your column is 1, then:
if(Column(1)<'0.7',green(),blue())
From the label, you can do like:
if([Productivity Percentage]<'0.7',green(),blue())
This will return an expression error, but it can be applied in the same way.
Or using your measurement as already said.
Note: see that the percentage was assigned with a . (point) 0.7
- Regards, Matheus
Thank you!! Using the column number in the expression worked!