Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Problem with a variable

Hi everyone,

I'm in trouble using a variable on my designe.

I built a pivot table and I have to insert my expression.

the expression is:

if( $(vUtPe) >= 0

      ,

          $(vUtPe)

      ,

          0

)

where $(vUtPe) is:

sum({ $<D_LIV1={BITI},D_LIV2={ATTIVO},Partite.Anno={ 2012}> } Partite.WRBTR)

+

sum({ $<D_LIV1={BITI},D_LIV2={PASSIVO},Partite.Anno={ 2012}> } Partite.WRBTR)

unfortunately it doesn't show me the result. I mean the test say OK is >0 but I don't have the result on my row. To be clearer it doesn't show me that records.

If I write:

if( $(vUtPe) >= 0

      ,

         'OK >0'

      ,

          0

)

it works. I have the row with " Ok > 0 ".

I don't understand what is going on.

The if test is working but when i try to put the variable as result it doesn't work.

Any help will be appreciated

thanks in advance

Giampiero

12 Replies
Not applicable
Author

Hi Jonathan,

THANK YOU so much.

It's a very good idea.

I like it a lot.

Thanks

Giampiero

Not applicable
Author

instead of this

if( $(vUtPe) >= 0

      ,

          $(=vUtPe)

      ,

          0

)

try that:

if( vUtPe >= 0, vUtPe,0)

regards,

MT

Not applicable
Author

Thank you,

good advise.