Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello community,
here's a simple example:
LET var= Dual('TEST',42814);
LET var2= Date(42814);
LOAD '$(var)' - 5 as FIELD1 AutoGenerate 1;
LOAD $(#var) - 5 as FIELD2 AutoGenerate 1;
LOAD '$(var2)' - 5 as FIELD3 AutoGenerate 1;
LOAD $(#var2) - 5 as FIELD4 AutoGenerate 1;
Why is there a difference between FIELD1 and FIELD3?:
I would expect the same result for FIELD1 and FIELD3 --> either the dual() - value will be passed through or not.
In my eyes this is just inconsequential behaviour...
Any ideas?
(using QV 11.2 SR15)
Format the date not the same way as your standard date format, so Qlik can't interpret the text expansion as date in your LOAD.
Assuming you are using german date format as default, try
LET var2= Date(42814,'MM/DD/YYYY');
And yes, it's a feature:
LET var= num(Dual('TEST',42814));
LET var2= Date(42814);
LOAD '$(var)' -5 as FIELD1 AutoGenerate 1;
LOAD $(#var) - 5 as FIELD2 AutoGenerate 1;
LOAD '$(var2)' - 5 as FIELD3 AutoGenerate 1;
LOAD $(#var2) - 5 as FIELD4 AutoGenerate 1;
hope this helps
thank you for your answers.
So I will solve it like that:
LOAD dual('$(var)',$(#var) - 5) as FIELD5 AutoGenerate 1;