Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Field not found - <<=>
I got that error and I don't know what is the cause and an alternative way to do this?
Not sure if Day is really needed, this should work also:
Temp:
LOAD Min(Date#(Period, 'YYYYMM')) As minDate,
Max(Date#(Period, 'YYYYMM')) As maxDate
Resident [Flight Data];
LET varMinDate = Peek('minDate', 0, 'Temp');
LET varMaxDate = Peek('maxDate', 0, 'Temp');
Can you also post the part in which you define the variables varMinDate and varMaxData?
And yes, it can be done different and I always do it different:
TempCalendar:
Load
Date($(varMinDate) + RowNo() -1) AS TempDate
AUTOGENERATE $(varMaxDate) - $(varMinDate) + 1;
Still might not fix your problem though, as I think that is in the part where you set your variables. I assume a typo or something.
the Period field was a string function, with the format YYYYMM so was just changing it to date field.
Hi Sibusiso,
Try like below,
Temp:
Load
Min(Date#(Period & '01', 'YYYYMMDD')) As minDate,
Max(Date#(Period &'01', 'YYYYMMDD')) As maxDate
Resident [Flight Data]
Not sure if Day is really needed, this should work also:
Temp:
LOAD Min(Date#(Period, 'YYYYMM')) As minDate,
Max(Date#(Period, 'YYYYMM')) As maxDate
Resident [Flight Data];
LET varMinDate = Peek('minDate', 0, 'Temp');
LET varMaxDate = Peek('maxDate', 0, 'Temp');
Yes. It's not required. I just added for better understanding!!
I suggest you add a TRACE to check the content of those variables. If the content is something weird or null, you have your source of the trouble.
TRACE Variable varMinDate is $(varMindDate);