you could probably check the Date field from end to start on a Date type value, then stop, like
LOAD * INLINE [
LET varMinDate = Num(Peek('Date',0,'Key_Table_For'));
for i = NoOfRows('Key_Table_For')-1 to 0 step -1
LET varMaxDate = Peek('Date',$(i),'Key_Table_For');
exit for when isnum($(varMaxDate));
LET varMaxDate = num($(#varMaxDate));
Hope this helps,
Under very special conditions (only valid Dates or NULL in field Date and only unique Date values, you could also try fieldvalue('Date',fieldvaluecount('Date') ) instead of the peek() for the last date record).
Do you have more Colum?
why you do not use in Scrip
WHERE Date <>'-';in the Load, by not to charge the lines.
What has worked for me to generate a calendar is to use a date base or minimum date, and the variable Today (), just like that today is my always maximum.
I hope you understand me, use google translators