Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Sometimes I need to have in a pivot table but for others calculations as well the amount of a previous values
e.g.:
Year | Sales | Sales (year-1) |
---|---|---|
2010 | 890 | - |
2011 | 900 | 890 |
2012 | 700 | 900 |
Without using before o above is it possible to obtain this result?
I thought to use set analysis .. but I got some problem with that. And actually I don't have a current selection on because I am showing all the possible Year.
Thank in advance
Using ABOVE works well - is there a reason you cannot ?
Regards
....although, I suppose it would not give what you want if you had a year with no values in the data at all
use Below code
Tab1:
Load * inline [
Year, Sales
2010, 890
2011, 900
2012 ,700
];
load *,
previous( Sales) as prev
resident Tab1;
drop table Tab1;
and in dimension take Year and in first expression Sales and in second expression take prev
and chart properties-> presentation->supress zero value->uncheck
hope this help
Hi,
Please find the attached for solution.
Hope this helps you.
Regards,
Jagan.
I really think this is the only way (through the script ) .... do you think that I can do the same with a set analisys?
Thanks again
Why this expression doesn't work ?
sum({$<Year = {$(#=Only(Year)-1)}>} Sales )
try this
sum({$<Year ={$(=only(Year)-1)}>} sales )
this will work on selections of years