May be it's due to load order in your script
Try this in your script :
(ooxml, embedded labels, table is Sheet1);
//order by SubmitDate;
(ooxml, embedded labels, table is Sheet2);
order by SubmitDate;
drop table Submissions;
Hey Bruno, thanks for the suggestion! Unfortunately, when I try that, I get an error later on in the MasterCalendar section that the table can't be found. I get that even when I name the original table Submssions1 and the second table Submissions and then drop Submissions1. But even when I don't drop any tables, or I do something to definitely load in the right SubmitDateWeekDay first, like by adding this at the top:
LOAD WEEKDAY(daynum) AS SubmitDateWeekDay, Dual(german, daynum) AS GermanWeekDay INLINE [
it still doesn't order things right. Plus, if I'm ordering based on my data, I'm not sure that the first date will be a Sunday or a Monday, so it may still have a funny order.
Is there something I'm missing about the load order, or is there some other way to approach this?
First i see that in your main script, the firstweekday is fixed to 6 ( saturday / Samstag) :
and in your mastercalandar :
WEEKSTART(TempDate, 0, 0) AS SubmitDateWeekStart, (third parameter give firstweekday, here monday
may be put the same parameter in main script and master calendar
in main script :
in master calandar :
WEEKSTART(TempDate, 0, 0) AS SubmitDateWeekStart,
Or 6 if you want saturday as fisrt day of week.