Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
sum({<Year={$(=Max(Year)-1)},MonthNo={"<=$(=Max({<Year={$(=Max(Year))}>}MonthNo))"}>}IF(ISNULL(GI_Weight)=-1,0,GI_Weight))
I am using this expresion to get previous year figure.
Bt it is taken max(MonthNo) which is 8 for all company.
Max(MonthNo) is different for different comapny in current yr.
Comapany | 2011 | 2010 | max(MonthNo)-2010 |
A | May | Dec | Aug |
B | Feb | Dec | Aug |
C | Jun | Dec | Aug |
D | Aug | Jan | Aug |
E | Aug | Feb | Aug |
F | Apr | Mar | Aug |
G | Mar | Apr | Aug |
Figure are showing upto Aug from Jan. Bt i want to show comapny wise max(MonthNo).
How can i do this.
hi
try this
sum({<Year={$(=Max(Year)-1)},MonthNo={"<=$(=Max(}MonthNo))"}>}IF(ISNULL(GI_Weight)=-1,0,GI_Weight))
may it helps you
thanks
rohit
hei
you need to replace your set analysis part of the month to if statment
you need to understand that set analysis is making the selection outside the chart that means
it look on all companies when calculating the max MonthNo
This not working.......
pls give me a sugestion.
I am attaching one qvw file and one excell file.
It will help to understand my problem.
Please give me a solution.
Thanks in advamce.