One of the concerns from my clients is that crosstab has a lot of limitations.
Users may want to have some calculation that involve part of the data inside the crosstab.
For example, assume I have a crosstab (Product, Date)->Revenue
There are Products A, B, C. Product C is actually a collection of A,B
So user may want to compare the sales of A,B with the sales of C.
The user may have some calculations like below
(Revenue for Product A + Revenue for Product B)/(Revenue in Product C)
However, I think you cannot use crosstab to do that.
Are there any workarounds?
Let me give an example. Here is the structure of the crosstab
_______Product Name
Date-----Revenue
For example, it will show something like
___________ A | B | C
19/3/2009----30 50 40
So now the client need the calculation (A+B)/C=2, as shown below:
___________ A | B | C | Ratio
19/3/2009----30 50 40 2.0
The problem for a crosstab is that I cannot get a particular item from the crosstab. i.e. I want to retrieve revenue of Product A, Product B and Product C in order to have the calculation. So I am thinking a workaround
First you need to have a column at the left side … right?
For that select the intersection values and take sum or average any at the left side, so that one column gets inserted. And now try your basic formula (A+B)/C. Let me know if it works properly , If not what results it is giving…?
Unfortunately is that I understand this approach, but not my client. Are there any other approaches?
For example, do some settings on the header…something like that
I think writing a variable is only the solution to this, as cross tab has certain limiltations. So you cannot play around the structure, but you can play around the input and output context to get the right results.