Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
i have yeaid as 0,-1,-2,-3,-4 and i have filling date.so i have to build a pivot table
for example----if the yearid=0,filling year is 2012
if it is -1 it has to show 2011 and if it is -3,-4 it shows 2010 and 2009 like this.
so i have written a expression year(sum{<yearid=0>}filling date).. so i stored in a variable
for -1 i just added -1 to the expression and stored in a variable ,for -2,-3 and -4 i did the same thing.
these dates i have to use it in the diemension when i clik onyearid=0 it shoiuld display,2012, if yearid=-1,2011
i can display if i select 1 year, but if i select more than one yearid it displays null.finally yearid valuses should be driven by the filling year.
so how to use using if statemetn.
can somebody help me plz
I don't understand why all this is needed. Why don't you select years themselves - 2012, 2011, 2010, 2009?
The thing is i dont have a year, i have only for 0 yr and i need to calcualte for the past 5yrs
You can do it in the script (on the front end too) without any if.
You know the current year - it is year(ReloadTime()). So, for any yearid, the year is
year(ReloadTime())+yearid
That gives you:
0 2012
-1 2011
-2 2010
...