This field is required.
Only these extensions are allowed(.jpg, .JPG, .jpeg, .JPEG, .gif, .GIF, .png, .PNG)
Tags cannot contain the characters ' /, \\, #, ?, or ; >,< '
Only these extensions are allowed(.zip,.ZIP,.pdf,.PDF,.qvf,.QVF,.qvw,.QVW)
Discussion Board for collaboration related to QlikView App Development.
I want to check if a value is Null, and if it is Null, I want to assign a value. This is what im trying:
if(IsNull([Stock]), [Stock] = 1, [Stock]) as [Stock]
Problem is, when I check the value the [Stock] = 0. So instead of making it 1 its 0.
How can I do this different?
if([Stock]=' ', 1, [Stock]) as [Stock]
View solution in original post
Did you try something like this yet:
If(IsNull([Stock]),0,[Stock]) AS [Stock],
Or If(Len([Stock])=0,0,[Stock]) AS [Stock],
All the non-null values turn into -1 for some reason when I use this.
Does your [Stock] field have null value or not? And if [Stock] is null then what value you want to assign?
Thanks alot! this worked for me. But instead of [Stock]=' ' I could use IsNull([Stock]). But just putting 1 in the second field worked.