Discussion Board for collaboration on QlikView Scripting.
Hello, i need to (monthly) iterate from InitMonth to ActualMonth but this code doesn't work
LET vActualMonth = Num(MonthStart(Today()));
LET vInitMonth = Num(MonthStart(AddMonths(vActualMonth, -2)));
FOR vLoopMonth = vInitMonth to vActualMonth step AddMonths(vLoopMonth, 1)
Any help please?
If i skip the step expression i can iterate daily but i want to get a monthly iteration.
The step expression is only evaluated once and it is an increment, so that approach won't work. Here's another approach.
FOR i = 0 to 2
LET vLoopMonth = AddMonths($(vInitMonth), $(i));
// Do something with vLoopMonth