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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how can I do a IF expression?

Hello guys

I have do do a simple If expression in qlikview sense :

IF ( field A) < ( field B); "delay";"ontime".

How can I do this excel expression in qlik?

1 Reply
swuehl
MVP
MVP

where do you want to use this expression? In script:

LOAD    

     fieldA,

     fieldB,

     If(fieldA < fieldB,'delay','ontime') as Newfield,

     ...

In a chart expression, you can use

=if(fieldA < fieldB,...)

but only if fieldA and fieldB show a unique value per your dimensional context.

If not, use aggregation functions

Use Aggregation Functions!