Author Topic: [closed]Cross Tab with different Aggregation  (Read 600 times)

Offline BIsrik

  • Statesman
  • ******
  • Posts: 473
  • Forum Citizenship: +12/-3
[closed]Cross Tab with different Aggregation
« on: 19 Jun 2006 04:02:54 am »
Hi,

 I have a requirement in which i need to have different aggregation for rows and columns in cross tab. for eg the usual cross tab report would be like this:

            Product A    Product B   Product C  Total
  2004      20               30               50         100
  2005      20               35               45         100
  Total      40               65                95        200

But i want the same cross tab to have a difference in aggregation in rows level and addition in column level. The Same Cross tab would then look like:

            Product A    Product B   Product C  Total
  2004      20               30               50           0
  2005      20               35               45        -10
  Total      40               65                95        -10

Notice the column aggregation is total and row aggregation is difference. How shall i do this in Cross Tab or any other ways.

Srik
« Last Edit: 06 Jul 2006 12:44:18 am by BIsrik »

Offline jcasella

  • Full Member
  • ***
  • Posts: 5
  • Forum Citizenship: +0/-0
Re: Cross Tab with different Aggregation
« Reply #1 on: 19 Jun 2006 07:58:07 am »
Have you tried just adding a calculation to the end of the table, and then aggregating the entire table.  For instance you table would look like this:

          Product A       Product B     Product C       Calculation
Year      A                     B                 C                    C - (A+B)

2004    20                   30                50                  0
2005    20                   35                45                  -10


Then put a total aggregate on the bottom of the table.

Offline BIsrik

  • Statesman
  • ******
  • Posts: 473
  • Forum Citizenship: +12/-3
Re: Cross Tab with different Aggregation
« Reply #2 on: 19 Jun 2006 08:40:41 am »
Ok ur suggestion would help me if i have fixed number of values. What i had given is just an eg. It is not always fixed to 3 products. Moreover in cross tab the values of a single dataitem are populated. U can't insert calculation at the aggregation level as u could do it in list. If the values are fixed then ur suggestion would be great help to us. But in real situation it is not so, the  number of values can vary.

Any other thoughts.

Srik