Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
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!