Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I found a script to create a master calendar (https://community.qlik.com/t5/QlikView-App-Dev/How-to-Create-Master-Calendar/td-p/103109)
In the first table I loaded these variables:
Appél:
LOAD
//Peloton as %Pel_nr,
"V-nummer" as [%P_ID-nr],
Year(datum)&num(month(datum))&Day(datum) as %Cal_SL_appel,
datum as appel_datum,
opmerkingen as appel_opm,
bijzonderheden as appel_bijz
later on, I have this part of the load script:
Load
Date($(vMinDate) + IterNo() - 1) as <DateField>
AutoGenerate 1
While $(vMinDate)+IterNo()-1 <= $(vMaxDate);
I want it to be like this field:
Year(datum)&num(month(datum))&Day(datum) as %Cal_SL_appel,
But I don't see how I can get it in the master calendar like this.
When I make it like this:
Load
Year(Date($(vMinDate) + IterNo() - 1))&Num(Month(Date($(vMinDate) + IterNo() - 1))&Day(Date($(vMinDate) + IterNo() - 1)) as %Cal_SL_appel
Autogenerate 1
While $(vMinDate)+IterNo()-1 <= $(vMaxDate);
I get an error: appel_datum not found
I don't see how I can get the datum in the desired format in my master calendar and make it the unique key used to connect to the table 'Appél'.
Just from your snippets it's not clear why you get the error on "appel_datum" ...
Beside this I wouldn't do it in this way. Means I would just keep datum as key between the facts and the dimension (and only duplicating the field within the facts by very special requirements) and just creating all kinds of period-fields formatting/interpretations in the calendar, maybe with something like:
load *, dual(date(DateNum, 'YYYYMMDD'), DateNum) as VisibleDate;
load *, date(DateNum) as DateKey;
load $(vMinDate)+IterNo()-1 as DateNum
Autogenerate 1 While $(vMinDate)+IterNo()-1 <= $(vMaxDate);