Qlik Community

QlikView Publisher

Discussion Board for collaboration on QlikView Publisher.

Announcements

Breathe easy -- you now have more time to plan your next steps with Qlik!
QlikView 11.2 Extended Support is now valid through December 31, 2020. Click here for more information.

Not applicable

compare time instruction IF

Hello
I am new to the forum, I need help, I have a table of two fields name and arrival time, I will wish to display all persons arriving from 7am: 45 red and one in green.

example

Header 1

Header 2

pat

05:45

nav

07:00

be

07:45

Hugues

10:50

but I do not know how to put in my expression
But I thought the  
If...Then...Else Statement,
rgb(255,255,255), rgb(0,255,0),hour(7),minute(45)

1 Solution

Accepted Solutions
swuehl
Not applicable

Re: compare time instruction IF

First, make sure that you've read in the time field correctly:

http://community.qlik.com/blogs/qlikviewdesignblog/2012/06/07/get-the-dates-right

Then, you can create a straight table chart with field 'name' as dimension and

=only([arrival time])

as expression, assuming one arrival time per name value.

Then you've got two options for colour the expression:

Either use the old-style visual cues tab in chart properties, and enter an expression like

maketime(7,45)

in the entry field for upper and lower limit (chosing an appropriate colour also).

VisualCue1.png

Or, second option, use a Text Color attribute expression in expression tab:

VisualCue1.png

Expression could look like

=if( [arrival time] >= maketime(7,45), lightred(), lightgreen() )

2 Replies
swuehl
Not applicable

Re: compare time instruction IF

First, make sure that you've read in the time field correctly:

http://community.qlik.com/blogs/qlikviewdesignblog/2012/06/07/get-the-dates-right

Then, you can create a straight table chart with field 'name' as dimension and

=only([arrival time])

as expression, assuming one arrival time per name value.

Then you've got two options for colour the expression:

Either use the old-style visual cues tab in chart properties, and enter an expression like

maketime(7,45)

in the entry field for upper and lower limit (chosing an appropriate colour also).

VisualCue1.png

Or, second option, use a Text Color attribute expression in expression tab:

VisualCue1.png

Expression could look like

=if( [arrival time] >= maketime(7,45), lightred(), lightgreen() )

Not applicable

Re: compare time instruction IF

Thank swuehl you it works