Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi,
I need create a dimension based on three conditions, I mean:
if(isnull(a) and isnull(b) and (not isnull(c), 'Z',
if((not isnull(a) and isnull(b) and isnull(c), 'Y')) as Dimension
This for seven cases. Always the same three fields in the conditions, always if is null or not null.
That code doesn't work in the script in Qlikview, neither:
if(isnull(a),
if(isnull(b),
if((not isnull(c)),'Z',
)
How I do that dimension in Qlikview?
Thanks. Regards.
Hello,
if(
isnull(a) and isnull(b) and not isnull(c),
'Z',
if(
not isnull(a) and isnull(b) and isnull(c),
'Y'
)
)
Hi Romina,
I think there are some issue with your If statement
Romina Villa wrote:
Hi,
I need create a dimension based on three conditions, I mean:
if(isnull(a) and isnull(b) and (not isnull(c), 'Z',
if((not isnull(a) and isnull(b) and isnull(c), 'Y')) as Dimension
So can you try below one and let me know:
If(IsNull(a) and IsNull(b) and Not IsNull(c),'Z',
If(Not IsNull(a) and IsNull(b) and IsNull(c),'Y')) as Dimension;
....
Regards,
Sokkorn
Hi,
That solutions doesn't work for me.
I've tried that what you say, Sokkorn, but that returns only the last value that I inserted in the code.
That's why I tried later with the parenthesis before nulls.
Thanks.
Try this
if(match(a,'0') and match(b,'0') and match(c,'0'), 'Z','Y')
Try:
IsNullMap:
mapping load * inline [
ABC, Letter
000,S
001,P
010,Q
011,Y
100,R
101,X
110,Z
111,T
];
Load A,B,C, applymap('IsNullMap', -isnull(A)&-isnull(B)&-isnull(C)) as Dimension
from ...somewhere...;
That works!
Thank you.
Regards.