Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hi everyone, I'm trying to create a table of monthyl minutes which is linked to the calendar but I get error messages. Any thought why this is not working?
LOAD
MonthYear
,
NetworkDays
(monthstart(Min(MonthYear)), monthend(MAX(MonthYear))) *24*60 asMonthlyMinutes
RESIDENT
MasterCalendar;
Hi,
your problem are the Min (Max) function in the table. Min (Max) are aggregation functions and used in a table with other fields will force you to use a GROUP BY.
To avoid this do the following:
First load Min and Max Date in a single table.
MinMaxDate:
Load
Min(Date) as MinDate,
Max(Date) as MaxDate
Resident MasterCalendar;
Second store the values in a variable.
LET varMinDate = Num(Peek('MinDate', 0, 'MinMaxDate'));
LET varMaxDate = Num(Peek('MaxDate', -1, 'MinMaxDate'));
Use the variable in your table.
LOAD
MontYear,
NetworkDays($(varMinDate),$(varMaxDate))*24*60 as MonthlyMinutes
RESIDENT MasterCalendar;
Hello ,
What are the values you are taking in the MonthYear field as the Monthstart, Monthend and Networkdays always take full date not just Monthand Year.
If possible upload the sample of the application
Talha