Crosstab Calculation

Just getting started on using Report Server and List and Labels, and really enjoying it. But struggling with the ‘total’ for a crosstab.
I know that you can choose full ‘sum’ total, or an average for the calculation on the right side of the crosstab, but is there a way to show a difference or a percentage difference between the two.
As an example:
in 2013, there were 10 records, in 2014, there were 5 records, so instead of a total of 15, I’d like to see a difference of -5 or a % of 50%. But I’d want this per row returned by the crosstab. Obviously, this would only work if there were only two columns in the crosstab to compare to. 1 column, or 3 or more columns would make this irrelevant. It would only work for 2 columns of data.

Is this possible.
Thanks.

Hello Dale,

thank you for your post.

It is possible to compare the values in every line of the crosstab. But it is a little bit tricky. The formula of the “Displayed Contents” has to look like this:

/* Output value */ fstr$(Crosstab.Value(), "?,?,?") /* Output percentage */ +Cond(NullSafe(GetVar("PreviousValue" +ToString$(Crosstab.Row$(0))))!=0, NullSafe(" ("+Fstr$((Crosstab.Value()/GetVar("PreviousValue" +ToString$(Crosstab.Row$(0)))-1)*100, "+?&")+"%)")) /* Save new value */ +SetVar("PreviousValue" +ToString$(Crosstab.Row$(0)),ToString$(Crosstab.Value ()),False)

Best regards,

Christian Rauchfuß
Technical Support
combit GmbH