Link to home
Create AccountLog in
Microsoft Excel

Microsoft Excel

--

Questions

--

Followers

Top Experts

Avatar of mcnuttlaw
mcnuttlaw🇺🇸

Pivot Table - Sum up the Rows Label
Is it possible to create an additional column in the pivot table with a calculated field to sum  (total ) the Rows Label (yellow highlight in the attached files)?

The current Row Label is set to show the Min value but I need for the row to have a total.

Note that the pivot table will grow dynamically in size (more players, more tournaments) so I would prefer not to have to manually create/update a column outside of the pivot table.

User generated imageBook1.xlsx

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of dlmilledlmille🇺🇸

Just add another field in your pivotTable, called CourseSum or something.

Then, add that field to your pivot table and have it do the SUMing:
User generated image
Dave
book1.xlsx

Avatar of mcnuttlawmcnuttlaw🇺🇸

ASKER

I only want the Rows Label (highlighted in the original image) to be totaled horizontally (not vertically).  

The current Row Label is already set to show the Min value (via its Field Settings) and I need a sum total of those Min values.

So in this case, the total would be 37 for the first highlighted Row Label and 45 for the second row.

Avatar of dlmilledlmille🇺🇸

>>I only want the Rows Label (highlighted in the original image) to be totaled horizontally (not vertically).  

You want a total column to the right of this data, as part of the pivot table?

Dave

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of mcnuttlawmcnuttlaw🇺🇸

ASKER

Yes, as part of the pivot table to avoid the manual updating of an independent column (due to the pivot table growing in size as the year progresses).

Avatar of dlmilledlmille🇺🇸

I'll take a look, though I'm pretty sure its not possible to do amalgamations of a summary row or column, even with calculated fields.  Even if you could, adding a calculated field to simulate the MIN row would not work as you'll be adding additional columns, as well.  

It is possible to write VBA code to dynamically give you that column to the right each time the pivot table is refreshed.

Failing doing it automatically, would you be interested in the VBA solution?

Dave

Avatar of mcnuttlawmcnuttlaw🇺🇸

ASKER

VBA would be acceptable if it can work reliably for a dynamically grown pivot table since I'll be handing the spreadsheet off to non-technical people.

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of dlmilledlmille🇺🇸

After transforming the data (which can be automated), I was able to format the pivot table such that columns could be tabulated.   As you can see, however, tabulating a min is not possible within the pivot table.

Attached.

Dave
book1-r1.xlsx

ASKER CERTIFIED SOLUTION
Avatar of dlmilledlmille🇺🇸

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of mcnuttlawmcnuttlaw🇺🇸

ASKER

Wow!  This is a nice piece of work thus far.  You seem to be a golfer yourself.

A few questions/comments...

Database Updated & Pivot Table - these seem to get updated only when clicking within the Pivot Table and does not seem to respond to F9.  I'm okay with this but possible to auto-update on something additional like a WorkSheet change?

Database Updated - possible to sort by Player which will then mirror into the Pivot Table?

Database Updated - in Original Data, I added in a column at the end called 'Total' and the Min (yellow) rows in Database Updated also does the Min calculations for this column which I don't need for Total scores.  Possible to instead to omit the Min calculation if the Column title is 'Total'?  This is not important at all to accomplish but would be less confusing when reviewing the data.

Pivot Table - seems to properly append correctly if more players/courses are added; however, their respective Min rows are not highlighted.

Pivot Table - possible to omit the highlighting within the VBA code if the type of tournament is an Away or Home tournament?  In other words, can there be a variable setting for each that if they are set to '1' then highlight, if set to '0' then don't highlight.

Thanks for spending the time on this one.

Avatar of dlmilledlmille🇺🇸

The highlighting was manual not intended to be anything else but to show you where rhe output was.

I'll take a look more closely this PM when back to my PC

Dave

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of dlmilledlmille🇺🇸

>>Database Updated & Pivot Table - these seem to get updated only when clicking within the Pivot Table and does not seem to respond to F9.  I'm okay with this but possible to auto-update on something additional like a WorkSheet change?

The pivot table updates automatically when you go to the "Original Pivot" tab

Database Updated - possible to sort by Player which will then mirror into the Pivot Table?
Use the pivot table for sorting.  If you want to sort Database Updated - add a data filter and sort by any column you find relevant.


Pivot Table - seems to properly append correctly if more players/courses are added; however, their respective Min rows are not highlighted.
if you want to highlight rows in the pivot table, suggest you ask a new question for that

Pivot Table - possible to omit the highlighting within the VBA code if the type of tournament is an Away or Home tournament?  In other words, can there be a variable setting for each that if they are set to '1' then highlight, if set to '0' then don't highlight.
there is no vba code highlighting.  I did that manually to show you the min row

If you think I've omitted anything that really should be in this solution, please clarify and I will address.  Some items you're asking for appear to me good candidates for follow-on questions (new question).

Please advise any outstanding issues, or close the question out if you believe you've gotten what you scoped in your question.  It was a fun, but intensive process as it took a few tries (more sophisticated than what I came up with) to get to the end game.

Dave

Avatar of dlmilledlmille🇺🇸

PS - I noticed your question about adding additional columns.  The min calculation only acts on columns that are displayed in the pivot table.  It IS possible to omit if the field has the word Total.

Please advise.  I've got a good idea on how to do the yellow highlighting for you, as well as hot to automate the sorting issues.

Dave

Avatar of mcnuttlawmcnuttlaw🇺🇸

ASKER

I'll put in new questions regarding the yellow highlighting and possibly the auto sorting.

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of mcnuttlawmcnuttlaw🇺🇸

ASKER

Did more than I was expecting.

Avatar of dlmilledlmille🇺🇸

Thanks - post here the link to your post, and I'll engage.

Dave
Microsoft Excel

Microsoft Excel

--

Questions

--

Followers

Top Experts

Microsoft Excel topics include formulas, formatting, VBA macros and user-defined functions, and everything else related to the spreadsheet user interface, including error messages.