Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am trying to obtain the average of products made within the working days of the period from when I have available data until now, which means for each week, counting the total pieces made and divided by the number of days effectively worked, what was the average produced?
The problem is when I try to obtain the working days measure, as I get it like this currently within my Master Calendar:
MasterCalendar:
LOAD
Date,
Year(Date) as Year,
'Q' & Ceil(Month(Date)/3) as Quarter,
Month(Date) as Month,
Week(Date,1,1) as Week,
Day(Date) as Day,
NetWorkDays(Min(Date), Max(Date), v$(Holidays)),
WeekDay(Date) as Weekday,
MonthName(Date) as MonthYear,
Year(Date) & '-' & Week(Date,1,1) as WeekYear,
Year(Date) & '-Q' & Ceil(Month(Date)/3) as QuarterYear
Resident ActivityLog;
In this case, I have a list of holidays that will be omitted. But even if I don't input anything there, I still get an error:
Hi @alespooletto ,
The error that you are getting in the script is because you are using aggr() functions without group by clause while using your NetworkDays() function.
Regards,
Rohan.