Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello everyone,
I am new to QlikView and I want to implement the following:
I need an element (QlikView-Object), that is a simple rectangle. Further I have an excel-datasource (imported through the "edit script" component, like in the totorial video), which looks like this:
Object | State
-----------------
object1 | active
object2 | active
object3 | waiting
object4 | active
object5 | active
object6 | broken
object7 | active
... and so on...
I now want the 7 rectangles, that represent my objects (for now I've just created simple text boxes) to change the color. For example green, if the objects state is active, yellow if the state is waiting and red if the state is broken.
How is that possible?
P.S. The excel-document-import works well so far. I've two tables, one is called Object, the other is called State and I can click on their rows to see which object is in which state and so on.
I would appreciate any help!
Doing five things at the same time.. 🙂
Attached Tobias's answer as Background-color and as text
Tank you very much, Tobias and Fred!
I've tried to put the if-statement in my calculated color of the text box and it works!
Fred, unfortunately I am using the QlikVIew Personal Edition at the moment, so I am not able to open your project-file. Is it possible to post some screenshots? I would appreciate your help!
Hi Eugen,
This the Text for 'obj6':
='obj6 = ' &
if(only({1<Object={obj6}>}State)='active','active',
if(only({1<Object={obj6}>}State)='waiting','waiting',
if(only({1<Object={obj6}>}State)='broken','broken',
'-'
)))
And this is the calculated BgColor for 'obj6':
=
if(only({1<Object={obj6}>}State)='active',RGB(0,128,0),
if(only({1<Object={obj6}>}State)='waiting',RGB(255,204,0),
if(only({1<Object={obj6}>}State)='broken',RGB(255,0,0),
RGB(100,100,100)
)))
Awesome! Works like a charm!
Thank you very much Fred!