Log In

Come Join Us!

Are you a
Computer / IT professional?
Join Tek-Tips Forums!
  • Talk With Other Members
  • Be Notified Of Responses
    To Your Posts
  • Keyword Search
  • One-Click Access To Your
    Favorite Forums
  • Automated Signatures
    On Your Posts
  • Best Of All, It's Free!
  • Students Click Here

*Tek-Tips's functionality depends on members receiving e-mail. By joining you are opting in to receive e-mail.

Posting Guidelines

Promoting, selling, recruiting, coursework and thesis posting is forbidden.

Students Click Here


Calculate % of a Row Grand Total

Calculate % of a Row Grand Total

Calculate % of a Row Grand Total

I am stuck here with a Pivot Table

if you see the image
Business center and Month are Rows

Rev, Exp are the type of values where USD Amount is sum

The Gran total is the automatic Total that the pivot table add.

What i need is to have another Column to show the % of the Gran Total against Rev Column
in "a" for example, the ne column should show 50% (5/10)
can this be done?

with out modifying the data source, cause is coming from sql

RE: Calculate % of a Row Grand Total


I would change your method thusly:

1) Make your query directly to the database, via Microsoft Query (Data > get external data > From other sources > From Microsoft Query... The data will reside on a sheet as a Structured Table, rather than a Pivot Table, but the data can be pivoted via SQL like this...


Transform Sum([USD Amount])
Select [Business Center], [month]
From YourSQL_Table
Where [month] = 10
Group By [Business Center], [month]
Pivot [Item] 
Then the additional column is a simple quotient formula...


The result

Business Center	month	Rev	Exp	Total	Total % of Rev
a       	10	10	-5	5	0.5
b       	10	100	-33	67	0.67


glassesJust traded in my OLD subtlety...
for a NUance!tongue

RE: Calculate % of a Row Grand Total

Instead of automatic Grand Total you can use two calculated fields, one for Total: =Rev+Exp, secpnd for% of Rev: =(Rev+Exp)/Rev. Pivot table sums fields in domain and calculates formulas.


Red Flag This Post

Please let us know here why this post is inappropriate. Reasons such as off-topic, duplicates, flames, illegal, vulgar, or students posting their homework.

Red Flag Submitted

Thank you for helping keep Tek-Tips Forums free from inappropriate posts.
The Tek-Tips staff will check this out and take appropriate action.

Reply To This Thread

Posting in the Tek-Tips forums is a member-only feature.

Click Here to join Tek-Tips and talk with other members!

Close Box

Join Tek-Tips® Today!

Join your peers on the Internet's largest technical computer professional community.
It's easy to join and it's free.

Here's Why Members Love Tek-Tips Forums:

Register now while it's still free!

Already a member? Close this window and log in.

Join Us             Close