Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am pulling data from SQL. I have a field with null value. The value is coming as '-' in qlik.
I did check using isnull and even used len(Trim(..
But still it is coming as '-'.
How can I proceed?
Thanks
The '-' is just a visible replacement for NULL to visualize the exists of NOTHING.
- Marcus
Hi,
But then when I compare using isnull(A,10,2), the else gets the value, but the if clause does not. For any null I need to replace it with eg. 10.
Why is it not working. Am I missing something?
Thanks,
Hello,
How are you?
I think that , you can use in your script this.
IF( ISNULL('PUTYOURFIELD'), 'eg. 10', 'PUTYOURFIELD') AS NAME
So, you will change '-' for the word fieldnull then you can do a filter or compare.
Bye
I did exactly the same,
IF( ISNULL('PUTYOURFIELD'), 'eg. 10', 'PUTYOURFIELD') AS NAME
But it is not working.
Please,
Can you post a part of script where is the code?
if( isnull (left(FieldName,1)), '10', left(FieldName,1) )
Fieldname is being pulled from SQL.
Try it,
if (isnull(FieldName), '10', left ( FieldName , 1))
or
if (left (FieldName, 1)= ' ', '10', left ( FieldName , 1))
Those values might not be a real NULL and then isnull() won't work. Usually this is better fetched with:
if(len(trim(FIELD)), 'YourDefaultValue', FIELD)
If it's a numeric field you could also use: alt(FIELD, 'YourDefaultValue')
- Marcus
Still the same