Solved

Access 2010 PivotTable Formulas

Posted on 2011-09-04
6
966 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
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.

 

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

U.S. Department of Agriculture and Acronis Access

With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A simple tool to export all objects of two Access files as text and compare it with Meld, a free diff tool.
As tax season makes its return, so does the increase in cyber crime and tax refund phishing that comes with it
In Microsoft Access, learn different ways of passing a string value within a string argument. Also learn what a “Type Mis-match” error is about.
In Microsoft Access, learn how to use Dlookup and other domain aggregate functions and one method of specifying a string value within a string. Specify the first argument, which is the expression to be returned: Specify the second argument, which …

770 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