Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

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
MVP
MVP

Re: how can I do a IF expression?

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!