Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Adding a formula column between columns in a CrossTab Report

Status
Not open for further replies.

JCook23

Technical User
May 19, 2004
39
US
CR 10.0
SQL Server

I have created a cross tab report for Orders Backlog by customer by month.

Jan Feb Mar Apr May
ABC Company 5000 6000 7000 5000 7000
DEF Company 5000 4500 6333 5555 8888


I would like to create a formula that takes the difference between months:
Diff Diff
Jan Feb Jan/Feb Mar Feb/Mar
ABC Company 5000 6000 -1000 7000 -1000
DEF Company 5000 4500 500 6333 -1833


The month is a parameter field. You can pick two or twenty different months. Any ideas on how this could be accomplished?

Thanks,

Jeff


 
I think that you'll need to create a manual cross-tab for this.

Group by the company.

Create formulas as in:

//@January
if month{table.date} = 1 then
{table.value}
else
0

//@February
if month{table.date} = 2 then
{table.value}
else
0

etc.

Place these fields in the details and select Insert->Summary->Sum and insert the summaries for each company group

Now you will see these summaries in the formula editor for performing the difference calaculations.

The values will be displayed at the Group Footer level.

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top