Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi Guys,
Im trying to make master calendar for the purpose of further analysis but faced an error.
Im afraid the reason of that is date format, I lodaded excel file where data is in format YYYY-MM-DD hh:mm, Qlik read it in format DD.MM.YYYY hh:mm:ss. I changed the format manually in DD/MM/YYYY in type of field and started to work on master calendar script, which is as follows (used from Qlik channel on yt):
MinMaxTable:
Load
min(SaleDate) as MinDate,
max(SaleDate) as MaxDate
Resident [sales 2018];
Let vMinDate = Num(Peek('MinDate', 0, 'MinMaxTable'));
Let vMaxDate = Num(Peek('MaxDate', 0, 'MinMaxTable'));
drop table MinMaxTable;
TempCalendar:
Load
$(vMinDate) + IterNo() -1 as numb,
Date([$(vMinDate)] + IterNo() -1) as TempDate
AutoGenerate 1 While $(vMinDate) + IterNo() -1 <= $(vMaxDate);
And I get the response:
Unexpected token: ',', expected one of: 'OPERATOR_PLUS', 'OPERATOR_MINUS', 'OPERATOR_MULTIPLICATION', 'OPERATOR_DIVISION', 'OPERATOR_STRING_CONCAT', 'like', 'and', ...
TempCalendar: Load 43374,056087963 + IterNo() -1 as no, Date([43374,056087963] + IterNo() -1) as TempDate AutoGenerate 1 While 43374>>>>>>,<<<<<<056087963 + IterNo() -1 <= 43465,685150463
Any ideas whats wrong with the script? is it because of date format?
I would appreciate your help.
Edyta
Apologies for posting it. I have managed to make it by myself.
I have not known that '' are required for '$(vVariable)' in new qlik sense desktop.
Apologies for posting it. I have managed to make it by myself.
I have not known that '' are required for '$(vVariable)' in new qlik sense desktop.