Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
I have a Pivot table, with Dimension 1 = Customer Region, Dimension 2 = Order Date. It looks like
Order Date | Jan 1, 2012 | Jan 2, 2012 | Jan 3, 2012 | |||
Region | Order | Diff | Order | Diff | Order | Diff |
---|---|---|---|---|---|---|
NY | 100 | - | 80 | -20 | 60 | -20 |
CT | 35 | - | 40 | 5 | 20 | -20 |
NJ | 22 | - | 33 | 11 | 11 | -22 |
While the Expression for Order is simply =Sum(Orders), I don't know how to write the expression for the Diff column, which is the difference of the sum of the orders between the current date and the previous date.
Can anyone show me an example?
Many thanks!
You can use Before, to operate in pivot tables, is like Above in Straight Tables.
Try this: sum(Orders)-Before(sum(Orders))
Hope it helps
Try this:
sum( {<[Order Date]={"=[Order Date]"},[Order Date]=>}Orders) - sum( {<[Order Date]={"=[Order Date]-1"},[Order Date]=>}Orders)
may be you want to try each one separately before
Thanks a lot for the help, but this doesn't work as "[Order Date]=" only disregard the filter selection, but the subset is still limited to the current dimension.
Sum(TOTAL<[Customer Region]> Orders) can get the subset that's limited only by the Region, but then {<[Order Date]={"=[Order Date]-1"},[Order Date]=>} isn't doing what I want it to do.
Please see if the attached solution will be acceptable.
You can use Before, to operate in pivot tables, is like Above in Straight Tables.
Try this: sum(Orders)-Before(sum(Orders))
Hope it helps
Thanks a lot for the help. I wasn't aware of the Before() function.
I'm looking for something similar but with above result. The difference column needs to a column of its own. Suggestions please?