Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Posting on Qlik Community is temporarily paused for some users. Thank you for patience and we'll update you soon!
cancel
Showing results for 
Search instead for 
Did you mean: 
Rogers2212
Contributor II
Contributor II

List of dates within a listbox

Hi All, Im new to this and looking for a little help. 

I have a variable and i am trying to have a variable input list box amend that, please can somebody advise on how i could automatically have the list box populate the first day of the month for the last 12 months?

I have tried using something like Floor(MonthStart(date(Todate()))) however if i try to build a list upon this it says anything after | is garbage.

Labels (3)
1 Reply
raji6763
Creator II
Creator II

hi @Rogers2212 ,

I hope this is helpful to you.Try this script

 

Let vMinDate = NUM(Date('01/01/2020','DD/MM/YYYY'));

Let vMaxDate = NUM(Date('01/12/2020','DD/MM/YYYY'));

TempCalendar:

Load

  AddMonths($(vMinDate),IterNo()-1) as TempDate

AutoGenerate 1

While AddMonths($(vMinDate),IterNo()-1) <= $(vMaxDate);

 

output:

raji6763_0-1594214433225.png

 

Regards,

Raji