Solved

MS Access Pivot Table calculated values

Posted on 2013-01-16
7
421 Views
Last Modified: 2013-01-18
I have a long list of "deals" each with a %margin on an advance (the amount the deal was for), the advance and a number of other fields e.g. manufacturer, retailer, equipment_type that I want to use as filter and I want to display the data by month (in yyyymm format - this is already calculated in the data)

I need to work with the weighted margin (margin*advance) which I have also calculated in the input query.

What I want to end up with is

(sum of weighted margin)/sum of advance

for each month which recalculates as the filter fields are applied.

Is this more than can be done in Access?  :-)
0
Comment
Question by:markremms
  • 4
  • 3
7 Comments
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 38782957
If I understand correctly, the answer is no because the calculation will end up as:
SUM(margin)*SUM(advance)/SUM(advance)

and not

SUM(margin*advance)/SUM(advance)

EDIT:

Wait, I think I misread. If you have already calculated the weighted margin in the query (i.e. for each row) then yes a calculated field of margin/advance should provide what you need.
0
 

Author Comment

by:markremms
ID: 38783069
So if I want to calculate detail something like:

x / sum( x)

then I can't?
0
 
LVL 85

Expert Comment

by:Rory Archibald
ID: 38785281
A calculated field will always aggregate all fields it depends on. If your query has already calculated the weighted margin at the detail level then the calculated field should do what you want
0
Enterprise Mobility and BYOD For Dummies

Like “For Dummies” books, you can read this in whatever order you choose and learn about mobility and BYOD; and how to put a competitive mobile infrastructure in place. Developed for SMBs and large enterprises alike, you will find helpful use cases, planning, and implementation.

 

Author Comment

by:markremms
ID: 38786659
Thanks for that.  What I want to be able to do though is to use the sum to be a part of the calculation for a detail cell.
0
 
LVL 85

Accepted Solution

by:
Rory Archibald earned 500 total points
ID: 38787099
No idea what you mean - can you give a specific example? (You can't use an overall total at a higher level if that's what you mean)
0
 

Author Comment

by:markremms
ID: 38787252
OK - sorry.  Me failing to communicate.

The original data contains values for weighted margins.

On the pivot table these will be shown in groups (with a sum for each group if I wish)

Against each weighted margin I would like to calculate its proportion of the whole group so I want to divide its value by the sum for its group.

Sounds like that might be possible if I can refer to higher level totals. :-)
0
 

Author Comment

by:markremms
ID: 38792230
Oh - you said can't...

Ah
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This tutorial explains how to create a series of drop-down lists that are dependent upon prior selections to guide (“force”) the user to make the correct selection and reduce data errors within Microsoft Excel. Excel 2010 was used for this tutorial;…
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
The viewer will learn how to use the =DISCRINV command to create a discrete random variable, use this command to model a set of probabilities and outcomes in a Monte Carlo simulation, and learn how to find the standard deviation of a set of probabil…
This Micro Tutorial will demonstrate how to use longer labels with horizontal bar charts instead of the vertical column chart.

932 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

17 Experts available now in Live!

Get 1:1 Help Now