Firstly thanks for taking the time to reply and help, much appreciated
However, the Pivot table I have shows the number of orders, displayed by Type, by either Period, Week, Day etc [depending on Group]
What i would like to show is the number of orders in one column and the difference compared to the previous in the next, and then repeat this for the next , for as many columns as required.
DATE 1 2 3
NUM DIFF NUM DIFF NUM DIFF
TYPE A 100 - 50 -50 75 25
TYPE B 200 - 100 100 75 -25
What expression would i need for this?
Sorry i wasn;t overly clear in my Previous Post.
Ah, this looks more like you have a dimension DATE you want to pivot.
I think you want to use the Before function.
From the help:
Returns the value of expression evaluated with a pivot table's dimension values as they appear in the column before the current column within a row segment in the pivot table. This function returns NULL in all chart types except pivot tables.
On the first column of a row segment a NULL value will be returned, as there is no column before this one.
If the table is one-dimensional or if the expression is preceded by the total qualifier, the current row segment is always equal to the entire row.
If the pivot table has multiple horizontal dimensions, the current row segment will include only columns with the same values as the current column in all dimension rows except for the row showing the last horizontal dimension of the inter field sort order.
The inter field sort order for horizontal dimensions in pivot tables is defined simply by the order of the dimensions from top to bottom.
Specifying an offset greater than 1 lets you move the evaluation of expression to columns further to the left of the current column. A negative offset number will actually make the before function equivalent to a after function with the corresponding positive offset number. Specifying an offset of 0 will evaluate the expression on the current column. Recursive calls will return NULL.
By specifying a third parameter n greater than 1, the function will return not one but a range of n values, one for each of n table columns counting to the left from the original cell. In this form, the function can be used as an argument to any of the special range functions.
before( sum( Sales ))
before( sum( Sales ), 2 )
before( total sum( Sales ))
returns an average of the three results of the sum(x) function evaluated in the three columns immediately to the left of the current column.