Qlik Community

New to Qlik Sense

Discussion board where members can get started with Qlik Sense.

Kohli
Contributor

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
Esteemed Contributor

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

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
Contributor III

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

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

Community Browser