Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
infock12
Creator III
Creator III

Background colour changes when the field heading is replaced

Hi everyone,

I had a table where I have following expression:

Rating=count([How do you rate yourself?])

Under Background colour, I wrote the following script.

=if(([How do you rate yourself?])<=3, RGB(255,30,0),
if(([How do you rate yourself?])<=6, RGB(255,150,0),
if(([How do you rate yourself?])<=9, RGB(100,200,50), blue())))

IT works perfectly. See below.

When I changed the field header from (How do you rate yourself?] to Rating, and applied the same background colour script, everything turns blue. Not sure what I am doing wrong. Could anyone advise please. I changed it in Load, under Expressions (count), under Dimensions (column header).

I copied the same formula and changed just the field name.

Thanks.

1 Solution

Accepted Solutions
stigchel
Partner - Master
Partner - Master

I think your expression is labeled Rating? Which probably means your color expression is now referring to the expression=the count instead of the field, which is never smaller then 9, hence blue? Try changing the expression label to e.g. Count Rating

View solution in original post

3 Replies
stigchel
Partner - Master
Partner - Master

I think your expression is labeled Rating? Which probably means your color expression is now referring to the expression=the count instead of the field, which is never smaller then 9, hence blue? Try changing the expression label to e.g. Count Rating

infock12
Creator III
Creator III
Author

Thanks for the quick response Piet Hein! That is absolutely right. Silly me!

stigchel
Partner - Master
Partner - Master

You're welcome!