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

multiple if condition

AOA

i want to execute this statemnt as expression.

IF sum(bal_qty)>0,'up'

IF sum(bal_qty)<0,'down'

IF sum(bal_qty)=0,'No change'

so what would be the expresion for this!!!!!!!!!

i tried

if(sum(bal_qty)>0,'up','down')

its work fine on two condition up and down

how to deal with third one when sum(bal_qty) = 0

???

1 Solution

Accepted Solutions
oleg_orlov
Creator
Creator

Hello! Try something like that:

if (Sum (bal_qty) > 0,

    'up',

    if (Sum (bal_qty) < 0,

        'down',

        'No change'

    )

)

View solution in original post

3 Replies
kumarnatarajan
Partner - Specialist
Partner - Specialist

hi,

try this one.

if(sum(bal_qty)=0,'No change',

if(sum(bal_qty)>0,'up',

if(sum(bal_qty)<0,'down',

)))

oleg_orlov
Creator
Creator

Hello! Try something like that:

if (Sum (bal_qty) > 0,

    'up',

    if (Sum (bal_qty) < 0,

        'down',

        'No change'

    )

)

Not applicable
Author

Both answer are correct.......