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

Announcements
Join us in NYC Sept 4th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
t_hylander
Creator
Creator

Setting variables with info from table

Hi,

I've got a table with following columns;

date, object, value, limit


I'm loading it with the following code;

LOAD date,
object,
value,
limit,
(value / limit) *100 as Percent
FROM myfile.xls ...


In one page I'd like to have a background-picture and textfield/button with the objektnumber on. What I'm struggling with is that I want the background color to change depending on if the objects value is above 100 procent at a given date (selected with a normal listbox)

Not sure howto accomplish this the best way...

Any help appreciated!
Thanks!

2 Replies
Miguel_Angel_Baeyens

Hello,

If I got you right, create a text object, and in General tab go to Background color, click on "Calculated" and set, for example

If(Percent > 100, RGB(0, 128, 0), RGB(128, 0, 0))


Since you are using a field, it will show always red until you select any object with Percent > 100.

Hope that helps.

t_hylander
Creator
Creator
Author

well, yes and no 🙂

Its more complex than that I think (might be wrong here tho).
I have to somehow "tie" a object to exactly that text-object.

On the picture there is like 50-ish individual objects that I want to monitor, and the only thing I wish to select is the date (default current date, but thats sorted).

edit: To make it more interesting, each object has several values and non of them should be higher than the limit.

Hope I made it more clear and not the other way around 🙂