Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Coloring table cell with IF statement

I have a similar table in Qlik Sense:

Clipboard01.jpg

I have a column for:

Physician

AVG RVU (productivity number)

Varience

What I would like to do is color the cell red or  green depending on the variance being a positive or negative change. Coloring the entire cell or just the arrow will work.

The expression for the varience is:

avg(total total_rvu)-avg(total_rvu)

Thank you in advance.

12 Replies
chancekbarkley
Partner - Contributor III
Partner - Contributor III

Nathan, i just tried it and this worked for me.

Use this in your Expression:

if((avg(total total_rvu)-avg(total_rvu))>0,'▲','▼')

Use this for your background color:

if((avg(total total_rvu)-avg(total_rvu))>0,Green(),Red())

Not applicable
Author

Hi Nathan,

Have you tried for the main expression

if((avg(total total_rvu)-avg(total_rvu))>0,'qmem://<bundled>/BuiltIn/arrow_n.png','qmem://<bundled>/BuiltIn/arrow_s.png')

But you must select (from Expressions tab) Display options Image (see picture)

Arrows.png

And keep

if((avg(total total_rvu)-avg(total_rvu))>0,Green(),Red())

As the colour format?

Fingers crossed, we'll all get there!

Regards,

Jason.

Not applicable
Author

Thanks, this did work!