Author Topic: group list in to 2 groups and produce total for each group  (Read 327 times)

Offline Thundercat

  • Associate
  • **
  • Posts: 4
  • Forum Citizenship: +0/-0
Hi
I have a list of companies and sales, I want to show the sales of one comapny against the total sales of all the others in a crosstab(as there is other data I want to add in).
e.g. I have;
Company |Sales
A           |15
B           |21
c           |35

I want to show;
company | Sales
A           |15
Others    |56

Any ideas

Offline whastings

  • Full Member
  • ***
  • Posts: 14
  • Forum Citizenship: +1/-0
Re: group list in to 2 groups and produce total for each group
« Reply #1 on: 27 Oct 2009 10:39:45 pm »
Drag a Query Calculation to the crosstab rows. In the query calculation, use an if statement:

if ( plant = 'A' )
then ( plant )
else ( 'Others' )

and just drag your sales measure into the measure cells.

If you want to parameterize your plant, you can do that too by replacing 'A' with ?Plant? (i.e. if ( plant = ?Plant? )...

Offline Thundercat

  • Associate
  • **
  • Posts: 4
  • Forum Citizenship: +0/-0
Re: group list in to 2 groups and produce total for each group
« Reply #2 on: 27 Oct 2009 11:21:41 pm »
Thanks whastings. that's a lot simpler than the solution I found which required me to create tables and then data items and join queies. ;D