Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Hello,
I want to retrieve all distinct dates (all in format MMM YYYY, using MonthName function) from my fact table and then append them by the next coming 12 months, here is my script but it is not working. Any suggestion
tmp:
Load Distinct OpenMonth as newDate
Resident Fact;
CONCATENATE (tmp)
LOAD
MonthName(Max(OpenMonth),IterNo()) as newDate
RESIDENT Fact
while MonthName(Max(OpenMonth),IterNo()) <= MonthName(Today(),12)
;
hi n.allano ,
Update your While Condicion as like below..
while num(Max(OpenMonth)) <= num(addmonths(date(Today()),12));
i think it will work....
Regards
A'run'
Yes, you are right. I understood that when I use < > to compare dates, I need to take their numeric values. However, the solution is still not working