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

Trying to Write IF statement

Hi All,

I am new to Qlikview. I am using Qlikview Desktop.

I am trying to write an IF statement. When I wrote the IF Statement, Expression is OK. But when I am trying to use the same variable in the expression to represent in the Chart table, It is giving all "-" the stated marks but not the values. Can someone let me know How to use a variable in the table which is a IF statement.

Thanks,

Sukumar.

6 Replies
alexandros17
Partner - Champion III
Partner - Champion III

Are you using SET to define the expression?

Could you share it with us?

Not applicable
Author

Hello Alessandro,

Here is how I wrote the IF statement.

=If(Sum([Object1]) >= (Sum($(GAP))*-1),

  If(Sum([Object1]) >= (Sum([SS]) - Sum([SH])),Sum([[Object1]]),

  If((Sum($(GAP))*-1) >= (Sum([SS]) - Sum([SH])),(Sum($(GAP))*-1),

  Sum([SS]) - Sum([SH]))))

Please correct me. and also I need to use this variable in another variable.

Thanks,

Krupa Sukumar B.

Not applicable
Author

Hi Alessandro,

When I write the same IF statement in an expression it is working fine.

But when used as a variable, it is not working.

jpenuliar
Partner - Specialist III
Partner - Specialist III

Can you also post your Set analysis code.

And what is your current actual value of your variable?

Not applicable
Author

Hello Jonathan,

I haven't written any set analysis Code as i am totally new to this Qlikview. Can you please suggest any document for reference to write this Set Analysis Code.

I have written only the above mentioned IF statement.

Thanks,

Sukumar.

jpenuliar
Partner - Specialist III
Partner - Specialist III

can you send your qv file to review?,