Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi.
I use the following approach to create a MasterCalendar:
//--------------------------------------------------------//
//----- MasterCalendar für Lagerbestand -----//
//--------------------------------------------------------//
[Datum_LB]:
// Datumsfelder zusammenstellen
LOAD
"%TempDatum" AS "%LB_Datum", // Datum;
// TempCalendar erstellen
LOAD
Date(mindate + IterNo(), 'YYYYMMDD') AS "%TempDatum",
maxdate
While mindate + IterNo() <= maxdate;
// Min/Max-Datum holen
Load
min(FieldValue('%LB_Datum', recno()))-1 as mindate,
max(FieldValue('%LB_Datum', recno())) as maxdate
AutoGenerate FieldValueCount('%LB_Datum');
Incoming Data only has month-end dates, so that all the other dates inbetween, created in the MasterCalendar, are obsolete.
Does anyone have an idea how to solve this problem ?
Reinhold
Solution:
Leave the floor()-statement, than the script works fine.
Thanks for help.
Reinhold
You could try something like this:
LOAD
"%TempDatum" AS "%LB_Datum" where "%TempDatum" = date(floor(monthend("%TempDatum")), 'YYYYMMDD');
...
- Marcus
ok - this is working.
But all other fields in the fieldlist except the first one (%LB_Datum") are now not loaded / calculated anymore. They are all empty.
Code-Snippet:
LOAD
"%TempDatum" AS "%LB_Datum", // Datum
"%TempDatum" & '-Test' as "test",
date(%TempDatum,'DD.MM.YYYY') AS "LB_Datum/Date",
.
.
.
where "%TempDatum" = date(floor(monthend(%TempDatum)),'DD.MM.YYYY');
Most likely, I have to adjust my script further... ?
ADD:
as it seems, the load-script does not work (called lines: 0)
Reinhold
Solution:
Leave the floor()-statement, than the script works fine.
Thanks for help.
Reinhold