Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
hi,
I want create master calender in qlikview .I write function like this letvmindate=num(peek('orderdate',0,'produt'))
letvmaxdate=num(peek('orderdate',-1,'product'))and I do not understand below this function.pls can anyone explain below functiondate($(varMinDate) + rowno() – 1) As TempDate
Autogenerate
$(varMaxDate) – $(varMinDate) + 1;
Thankyou,
Regards
madhu
Hi
date($(varMinDate) + rowno() – 1) As TempDate
Autogenerate
$(varMaxDate) – $(varMinDate) + 1;
It generate the dates from Min Date to Max Date.
Hi,
date($(varMinDate) + rowno() – 1) As TempDate
Autogenerate
$(varMaxDate) – $(varMinDate) + 1;
TempDate column will create a sequence dates from minimum date i.e(varMinDate) to maximum date i.e(varMaxDate).
Ex : Consider varMinDate 1021 (i.e 21May2015) and varMaxDate 1030 i.e(30May2015), now the above code looks like below :
firstloop:
date(1021 + 1 - 1) as TempDate
Autogenerate
1030 - 1021 +1;
Output for TempDate = 21May2015
secondloop:
date(1021 + 2 - 1) as TempDate
Autogenerate
1030 - 1021 +1;
Output for TempDate = 22May2015
...
...
...
Tenthloop:
date(1021 + 10 - 1) as TempDate
Autogenerate
1030 - 1021 +1;
Output for TempDate = 30May2015
1030 - 1021 +1 = 10, so the loop runs only for 10 times
I hope this example gives you some idea.
Regards,
Satish.
thankyou satish.i understand but date(1021 + 1 - 1) as TempDate.in this example. the 1021 adds +1=1022 -1=1021 is this process.or what is +1 and -1 explain pls satish.
regards
madhu
+1 is the increment in the value and -1 is the deduction. Hence the +1 is adding one day to the min date here.