Discussion Board for collaboration on QlikView Scripting.
Actually i have 8 months, in this 7 months comes under 2013 and 1 month comes under 2014. so here max month should be 1st month
of 2014.How should i calculate max month as a dimension?.i used autonumber function on month&year but 1st month of 2014 giving 1 number so i am getting dec-2013 as a max month.i need jan-2014 as a max month.
plz help me on this.
Solved! Go to Solution.
instead of using the month such as it is, calculate MONTHEND() - that will give you Jan-31-2014 for this January, which should be your max_month, yes? Then calculate the max date out of these and then just plug in a MONTH() function.
I think you can use a Month Number. Suppose your date field name is Period then you can use the below expression in your Load Script to create a Month Number
num(Month(Period)) + if(Year(Period)=Year(Today()),12,0) as MonthNum,
and then you can use it in your chart expressions. Max(MonthNum)