Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I am generating months and years between two dates as below.
LOAD
Date(AddMonths(MonthStart($(vDateMin)),IterNo()-1),'MMM YYYY') as Months,
Year(Date(AddMonths(MonthStart($(vDateMin)),IterNo()-1),'MMM YYYY')) as Years
//Date(AddYears(YearStart($(vDateMin)),IterNo()-1),'YYYY') as Years
RESIDENT JIRA
While AddMonths(MonthStart($(vDateMin)),IterNo()-1) <= MonthStart(End Date);
I need to add another date (03/31/2022) in WHILE where it generates the years until End Date or 03/31/2022 - whichever date is less. How do I do that?
@qlikwiz123 may be this
While AddMonths(MonthStart($(vDateMin)),IterNo()-1) <= rangemin(MonthStart(End Date), makedate(2022,3,21));
@qlikwiz123 may be this
While AddMonths(MonthStart($(vDateMin)),IterNo()-1) <= rangemin(MonthStart(End Date), makedate(2022,3,21));
This worked perfectly. Thank you @Kushal_Chawda