Solved

Access 2010 PivotTable Formulas

Posted on 2011-09-04
6
950 Views
Last Modified: 2012-05-12
I'm trying to figure out how to use the Access 2010 PivotTable Formulas option.  The two options are Create Calulated Total and Create Calculated Detail Field.  

I want to create a Pivot Table that totals a numeric field, when I drag the field into the Pivot Table I get each value instead of a sum.  I thought I could use the Formulas, Create Calculated Total, but it tives me a #Value error if I enter Sum(field) or click the Insert Reference To option.   I do get a value if I type a number or simple formula like 5 + 2.
I've searched the internet and cannot find any help on this subject.  If someone understands how this works, please explain it to me.

I have been able to get it to work if I first create a Calculated Total Field and leave the value a 0 and then drag my numeric field in and resize the other total column to make it invisible, but that doesn't seem like the way it should be done.

Thanks
0
Comment
Question by:ChampagneGal
  • 3
  • 2
6 Comments
 
LVL 92

Expert Comment

by:Patrick Matthews
ID: 36480989
Perhaps if you posted a smallish sample file, purged of any confidential/sensitive data, that illustrates wht you're trying to do, I or another Expert can help you.

:)
0
 

Author Comment

by:ChampagneGal
ID: 36481869
Thanks for the reply.  I've uploaded the sample database.  It's just a training database and I'm creating the pivot table forms based on the qryPivotTableExample.

The frmPivotTableExample is just the basic shell with the Booking Dates in the left column and the SalesRep Names along the top and nothing in the middle.

The frmPivotTableExample with Total Errors is the example I get when I click on the Formulas command and then select Create Calculated Total.  I have tried typing the name of the field, selecting it from the drop down and clicking the Insert Reference to button and also using the Sum([NoOfPeople]) and each time I get the #VALUE error.

The frmPivotTableExample with Extra Total Column is the only one I can get to work, but I don't think I'm doing it the most efficient way.   I add a Total Column using the Formulas/Create Calculated Total and don't put anything in it, but it does create new columns titled New Total with a value of zero.   Next I drag the NoOfPeople field into the first column under Allen and it inserts a column titled Sum of NoOfPeople with the correct values.   I can hide the New Total column to "fake" it, but I'm not understanding the purpose of the Formulas/Create Calculated Total command.

I hope this makes sense...   Thanks for trying to help me.
fwt-sample.accdb
0
 
LVL 74

Expert Comment

by:Jeffrey Coachman
ID: 36484788
It is still not clear what your "exact" expected output should be.
Can you provide some sort of a graphic (markup an existing image, ...etc) to show the "exact" output you need, based on the sample data.

In any event...
<I want to create a Pivot Table that totals a numeric field, when I drag the field into the Pivot Table I get each value instead of a sum. >
After you drag the field in, right-click any value and select: AutoCalc-->Sum
(screencast attached.)


As far a s "calculated fields" go, I sometimes find it easier to add these calculated fields to the underlying query, then simply drop them into the Pivot like any other field.

JeffCoachman
boag2000-496022.flv
0
Do You Know the 4 Main Threat Actor Types?

Do you know the main threat actor types? Most attackers fall into one of four categories, each with their own favored tactics, techniques, and procedures.

 

Author Comment

by:ChampagneGal
ID: 36490543
Thanks for the video and the comment.   I like your idea of using a query and your suggestion works, but do you know how (or why) someone might use the Formulas - Create Calculated Total or Create Calculated Detail Field?  

Thanks,
0
 
LVL 74

Accepted Solution

by:
Jeffrey Coachman earned 500 total points
ID: 36490746
<but do you know how (or why) someone might use the Formulas - Create Calculated Total or Create Calculated Detail Field? >

Six of one, half dozen of another....
;-)

But the main reason that a person might opt to create the formulas/Calculated fields in the Pivot itself is that they do not have access to modify the underlying query.
Or perhaps there is only a table behind the Pivot.
Or perhaps they are Pivot experts, and simply prefer to do this in the Pivot.
Finally, there might very well be some functionality in doing this in the Pivot, that is not available with the table/query.

But for most Basic Cases (ex.: Orders, where Price*Quant is needed) creating the calculations in a query, then creating the Pivot from the query would seem the most straightforward.
(...IMHO)

JeffCoachman
0
 

Author Closing Comment

by:ChampagneGal
ID: 36491036
Thank you so much for explaining that, I really appreciate it.
0

Featured Post

Backup Your Microsoft Windows Server®

Backup all your Microsoft Windows Server – on-premises, in remote locations, in private and hybrid clouds. Your entire Windows Server will be backed up in one easy step with patented, block-level disk imaging. We achieve RTOs (recovery time objectives) as low as 15 seconds.

Join & Write a Comment

In Debugging – Part 1, you learned the basics of the debugging process. You learned how to avoid bugs, as well as how to utilize the Immediate window in the debugging process. This article takes things to the next level by showing you how you can us…
Introduction The Visual Basic for Applications (VBA) language is at the heart of every application that you write. It is your key to taking Access beyond the world of wizards into a world where anything is possible. This article introduces you to…
Basics of query design. Shows you how to construct a simple query by adding tables, perform joins, defining output columns, perform sorting, and apply criteria.
Using Microsoft Access, learn some simple rules for how to construct tables in a relational database. Split up all multi-value fields into single values: Split up fields that belong to other things into separate tables: Make sure that all record…

708 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now