Qlik Community

Qlik Education Discussions

Discussion Board for collaboration related to Qlik Education.

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

Re: Trying to Write IF statement

Are you using SET to define the expression?

Could you share it with us?

Not applicable

Re: Trying to Write IF statement

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

Re: Trying to Write IF statement

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
Valued Contributor III

Re: Trying to Write IF statement

Can you also post your Set analysis code.

And what is your current actual value of your variable?

Not applicable

Re: Trying to Write IF statement

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
Valued Contributor III

Re: Trying to Write IF statement

can you send your qv file to review?,

Community Browser