Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
Can you please help me out with the following IF statement?
If (ReceiptValueCurrency=0,Value,ReceiptValueCurrency)
I had a look in the database and when I want the field Value to show ReceiptValueCurrency should have no value at all (not even zero). How do I write this?
Thanks!
if(isnull(ReceiptValueCurrency) or len(trim(ReceiptValueCurrency)) = 0,Value,ReceiptValueCurrency)
OR even below:
if( len(trim(ReceiptValueCurrency)) = 0, Value, ReceiptValueCurrency )
this works also if ReceiptValueCurrency field is empty.
please try If (len(ReceiptValueCurrency)=0,Value,ReceiptValueCurrency)
or
If (ReceiptValueCurrency=' ',Value,ReceiptValueCurrency)
I used IF(len(ReceiptValueCurrency)=0,Value,ReceiptValueCurrency) and it worked, thank you!
Can you please explain what the function 'len' does to the statement?
take a look at Len - script and chart function ‒ QlikView
len() used check length of your field value if there is no value means null then it will consider as 0.
Hello madeleine.josefsson , our friends share with you the answer please feel free to mark the person as correct answer who give it first, then her is a resume of all possible answers :
If (len(ReceiptValueCurrency)=0,Value,ReceiptValueCurrency)
If (ReceiptValueCurrency=' ',Value,ReceiptValueCurrency)
if( len(trim(ReceiptValueCurrency)) = 0, Value, ReceiptValueCurrency )
if(isnull(ReceiptValueCurrency) = 0,Value,ReceiptValueCurrency)
and for function len() it calculate the value lenght of the field given between (), for further informations visit this link Len - script and chart function ‒ QlikView