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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Add a calculated total/summary/something row to a Cross-Tab

Status
Not open for further replies.

ESquared

Programmer
Dec 23, 2003
6,129
US
Hello ladies and gentlemen.

I have a Cross-Tab that's looking just about right, except for one thing.

I would like to add a row that is a formula, for each column, a percentage expressed as the sum of certain rows divided by the sum of all the rows.

For example, right now I have

[tt] 4/04 4/11 4/18 Total
A 5 12 9 26
25% 48% 45% 40%

B 10 6 6 32
50% 24% 30% 33.8%

C 5 7 5 17
25% 28% 25% 26.2%
------------------------------------
Total 20 25 20 65[/tt]

With the final row suppressed because they are all 100%.

What I'd like is another row underneath Total which is the percent, A+B/total,

D 75% 72% 65% 77.8%


Can this be done? And will there be a space between the Total line and D? Suppression seems to just blank things out, not actually suppress them and recover the space they take.

-------------------------------------
A sacrifice is harder when no one knows you've made it.
 
By the way... jeez, um... I didn't mean to pound you all with questions! If anyone needs help with SQL just head on over to the MS SQL Server programming forum and we'll see what we can do for you.

-------------------------------------
A sacrifice is harder when no one knows you've made it.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top