Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Kohli
Creator II
Creator II

AddMonths($(vDate), RecNo()) as Date,

Can you please explain the meaning of it:::    AddMonths($(vDate), RecNo()) as Date,

                                                                     ceil(rand()*1000) as Amount

                                                                   AutoGenerate 36

2 Replies
YoussefBelloum
Champion
Champion

Hi,

this script generates 36 lines, on each line it generates a Random amount and a Date.

it starts with a date which is the variable vDate

example

vDate= 01/01/2016

this script willgenerate a date for each month on 3 years ending to 01/12/2019

big_dreams
Creator III
Creator III

Understand your script line by line

addmonths() - > this function is use to add / deduct months from date.

ceil() - > it is rounding function

rand() 0 >generate random number.

AutoGenerate -> use to loop with end condition.

for more detail see help menu..

Regards