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

Announcements
Join us to spark ideas for how to put the latest capabilities into action. Register here!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Creating a variable for month end dates for the past year

I need to create a variable to use in a for loop to execute a stored procedure. The variable needs to hold the last date of every month going back one year from Today(). Is this possible?

1 Reply
dplr-rn
Partner - Master III
Partner - Master III

yes.

try something like below

let vMonthdates ='';
for i=1 to 12
	vMonthdates=vMonthdates &','&MonthEnd(addmonths(today(),-1*i))
next;