Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a variable created to calculate the number of months back from which I need to calculate the sales.I also have sales listed by months.
For example, if n is 6, I need to calculate the sales from july 2014.
I tried several expressions but unable to seem to get it right. Can someone please help ?
hi
I use the following expression, but there is a problem, when I select Month=2, the result only show which belong to Month 2, not the rolling result.
vBegin=Num(date(Addmonths(Date#(Max(MonthKey),'YYYYMM'),-11),'YYYYMMDD'),'#,##0')
vEnd=Num(Date(Max(DateDate),'YYYYMMDD'),'#,##0')
Count({<Month={$(vCurrentMonth)},Key={"<=$(vEnd)>=$(vBegin)"}>}Machine
Hi,
Try changing the variable expression as below. Omitted the month selection from calculation.
vBegin=Num(date(Addmonths(Date#(Max({<Month=>}MonthKey),'YYYYMM'),-11),'YYYYMMDD'),'#,##0')
vEnd=Num(Date(Max({<Month=>}DateDate),'YYYYMMDD'),'#,##0')
Regards,
Prabhu Appu