Pivot Tables - Create New Fields On The Fly?

Feb 1, 2010

it's possible to create new fields (variables/columns) on the fly (without adding them to the original data table).

For this example, assume I have a column for:
job code estimated hours
job code actual hours
total estimated hours
total actual hours

Excel has made it easy to run averages or sums for any of those columns, but what if I want to see what the average proportion for job code estimated hours/ total estimated hours? Is there an easy way to do it with pivot tables without adding a column to my database? I'm working in Excel 2007, my data table size is approximately 100 columns by 200 rows.

View 2 Replies


ADVERTISEMENT

Calculated Fields In Pivot Tables

Dec 5, 2006

My Pivot Table data section contains calculated fields and normal fields...both have sub and grand totals. The calculated items are correct but. the calculated field totals are incorrect. The normal field totals are correct. The calculated field totals are ... the True total multiplied by the number of items!

View 2 Replies View Related

Pivot Tables - Calculations Based On The Fields?

Jan 16, 2014

I am just starting to use the wonderful pivot tables.

I have a long list of data which basically consists of the following info:

-Company Code
-Country
-Account description
-Account balances

The pivot table is set up like so:

Row labels - Company Code, then Country

Column Labels - Account description, eg Input Tax, Output tax, clearing account, import tax, acquisition tax, set off account
Values - Account Balance

The table works perfectly.

Now what I want to do is some calculations based on the fields

- a check that Acquisition tax = the negative of the set off account, (i.e net to nil)

- a sum of the balances in the import, input and output tax accounts

- a comparison of that last figure against that in the clearing account to identify a difference

I tried to do it using basic formulae but I can't drag and drop the formula down the rows.

And I couldn't make out what the calculated cell function does. It appears to only include the titles of my data and not the individual fields.

View 1 Replies View Related

Linking Pivot Tables - Multiple Page Fields

Feb 16, 2010

I have two pivot tables on one sheet and I want the page fields on the second to change when I change the first pivot table. I found the below code and have applied it to one of the three page fields I have, but can't seem to duplicate it for the other page fields:

View 7 Replies View Related

Pivot Tables And Counting True Fields For Two Columns

Feb 26, 2009

I have just started using pivot tables and I have ran into a problem with the count feature. I have an original data list that breaks down in the pivot table to:

date
events on that date

Using the pivot table facilities, I want to do a count of those who said they were going to attend, and those who actually attended. The detailing both of these columns on the original list have a true false designation. When I do the count, the summarised information only counts the number of records for each of these events, and not the 'true' field entries for each of these columns.

How do I count these two parameters for 'true' from the original list in the pivot table so I can see a comparison between these two numbers?

View 9 Replies View Related

Pivot Tables & Formula: Build A Pivottable And Let Users Move The Fields Around

Apr 28, 2007

I'm trying to do at the moment is build a user interface for some Excel Data. Now, the natural way to do this would be to build a pivottable and let users move the fields around, and this is how the thing has worked in previous iterations of the workbook. It seems now, hoever, that we're trying to cater for users for whom pivot tables are just a little too much and to summaries data based on listboxes etc.

What I'm interested in knowing is whether there are ways of interacting with PivotTables beyond the GETPIVOTDATA function - is there any way, for example, to select different field items to show based upon an input from elsewhere? How does one tell a pivottable what to do from outside the pivottable?

View 3 Replies View Related

Macro Create Pivot Tables?

Jun 27, 2007

I created a macro by using the macro recorder. It creates some columns and formulas and does some formatting, then it is to take the data and create some pivot tables.

for some reason it gets stuck on the first pivot table. It creates it, but it wont add the first field to the table.

View 4 Replies View Related

Macro To Create Pivot Tables

Oct 22, 2006

I have recorded a Macro to create Pivot Tables, I would like this to run in any workbook. The problem is that every time a Pivot Table is generated Excel alters the number of the table(Pivot Table options). This then does not match that in the Macro as below("PivotTable1").

ActiveWorkbook.PivotCaches.Add(SourceType:=xlDatabase, SourceData:= _
"Sheet1!R1C1:R37C6").CreatePivotTable TableDestination:="", TableName:= _
"PivotTable1", DefaultVersion:=xlPivotTableVersion10
ActiveSheet.PivotTableWizard TableDestination:=ActiveSheet. Cells(3, 1)
ActiveSheet.Cells(3, 1).Select
With ActiveSheet.PivotTables("PivotTable1").PivotFields("GAME")
.Orientation = xlRowField
.Position = 1
End With
With ActiveSheet.PivotTables("PivotTable1").PivotFields("LANGUAGE")
.Orientation = xlRowField
.Position = 2

View 2 Replies View Related

How To Create Calculated Field Based Off Two Avg Fields In Pivot Table

Feb 12, 2014

I have a Pivot table that pulls the Avg of two fields for two months, see example below.

Avg Gross $ Avg Net $
Jan 2014 20 10
Feb 2014 30 20

sample 1.png
See sample attached.

The Avg Gross and Net is shown by going into the values and selecting "Summarized value by -> Average".

On the right side of this Pivot, what I wanted to do is to show a Avg Gross to Net $ in this pivot. So the formula should take "Avg Gross $" - "Avg Net $" = Avg Gross to Net $.

I am having trouble calculting this new field in the pivot table using a calculated field because the Calculated field pulls the variables from the existing field list and there isn't a field called "Avg Gross/Net"....I need to find a way to calculate the Avg Gross to Net into the Pivot table so I can pull a pivot graph out of it.

View 3 Replies View Related

Create Addin That When Clicked Refreshes All Pivot Tables?

Mar 12, 2012

I am trying to create an addin that when clicked refreshes all pivot tables and queries insteading of using the right click refresh or refreshall option button. This is part of a larger project which requires the addin -vs- the built in functionality. Anyways...the following script if I put it in a button and run it...it works perfect....if saved and run as an addin it blows past the refresh code and does not refresh anything, but will cycle through each worksheet.

I also tried thisworkbook.refreshall and activeworkbook.refreshall and neither worked.

Code:
Dim wks As Worksheet
Dim p As PivotTable
Dim qt As QueryTable

[Code]...

View 1 Replies View Related

Macro To Create Pivot Tables And Sort Out Data In Other Worksheet

May 19, 2009

The first sheet is the row data given to me, the second one is where I want my data to be analysed automatically by macros.

I managed to create a pivot table manually to give me the info I want but then I still have to copy all the results from the pivot table sheet to my analysis sheet.

How can I create a macro able to do all that by it self? I tried to record a macro using the recorder but then when I try to play it it gives me an error straight at the beginning in the definition of the pivot table I think.

An example of what I want the pivot table to do is:
in the first sheet, go in the small table in column K and L, take the value of L1, then in the row data in column A to J, in column C look for the value in L1, once found, look for the value 1 in column J then do the average on the values in column E and put the result in my second sheet in cell F5
then do the same but look for 2 in column J and put it in F8, then 3 in F11, ... until 7 found (the data is in ss.000 and so the results in the second sheet should be formated the same way)
then do the same all over again for value in L2
etc etc etc

this should be done for the 6 values in column L, each having values up to 7 in the J column.

Then I need to do the same for other columns and not only averages but minimums as well but I can adapt the code I think.

View 14 Replies View Related

Convert Column Data Fields To Row Data Fields In Pivot Table

Feb 8, 2014

CountryHourDataTotalData
Austria - A10Sum of SeiA51CountryHourSum of SeiASum of SeiT
Sum of SeiT4.88Austria - A10514.88
1Sum of SeiA561562.83

[Code]....

left side pivot created in vb 6.0 & right side pivot table created manually in excel.

i want to generated pivot table using vb 6.0 same as right side pivot.

Set PRange = ws1.Range("R1:Y" & finalrow)
Set PTCache = wb.PivotCaches.Add(SourceType:=xlDatabase, SourceData:=PRange)
Set PT = PTCache.CreatePivotTable(TableDestination:=ws2.Cells(1, 1),

[Code]....

View 2 Replies View Related

Adjust Column Label Selection Multiple Pivot Tables Based On One Pivot Table

Aug 16, 2013

I have a pivot table in the first sheet which includes the field "Date" as a column label.

In the remaining sheets, except for one, there are pivot tables based on the same underlying dataset which also include the field "Date" as a column label.

I would like to adjust the selection (i.e., exclude some dates) from the column label in the first sheet and see if it is possible to make the same adjustments automatically to the pivot tables in the remaining sheets as well.

note that the field "Date" is used as a Column label, i.e., it is not a Report filter.

View 3 Replies View Related

Change Pivot Source Data In Multiple Pivot Tables?

Jan 21, 2013

I have a single workbook with multiple worksheets. Each worksheet has a different pivot table displaying a different view of the data. Each pivot table uses the same source data at worksheet1.

Each week i add new data to the end of the source data, which means that I need change the source data reference separately in each pivot table to update each pivot table view to include the new data. This is laborious as there are quite a few pivot tables.

Was wondering if there is some way of changing the pivot table source data reference on all pivot tables at the same time.

View 4 Replies View Related

Count Pivot Fields In Pivot Table

May 2, 2007

I am trying to find a way to count the total number of pivot fields in a pivot table so I can remove ghost pivot items that are no longer in the pivot table data. My code for this subroutine is as follows;

Sub RemoveGhostPivotItems()
Dim ghost As PivotItem
Dim pt As PivotTable
Set pt = ActiveSheet.PivotTables(1)
pt.ManualUpdate = True
For Count = 1 To 10
On Error Resume Next
For Each ghost In pt.PivotFields(Count).PivotItems
ghost.Delete
Next ghost
Next Count
pt.ManualUpdate = False
End Sub

My code makes an assumption that I have 10 Pivot Fields or less. It would be nice to actually know the number of Pivot Fields so my "For Count" Loop would be more efficient. In otherwords;..............

View 2 Replies View Related

Refresh Pivot Tables Linked To Pivot Table

Jul 25, 2006

I currently have several pivot table that's linked to a single pivot table(let's call it X) in the same workbook. I'm doing this to limit the file size because the data in X comes from a text file that has millions of lines. However, it's such a pain every time I need to update the tables because simply clicking "refresh" does not update those tables that are linked to X with new data. I would have to instruct the wizard in every linked table to point to X every time. I'm trying to write a small program to re-point to X for each of those other pivot tables whenever i refresh data. However, after trying to record the steps to do this I'm still unable to run these

Sub Macro1()

ActiveSheet.PivotTableWizard SourceType:=xlPivotTable, SourceData:= _
"PivotTable1"

End Sub

View 6 Replies View Related

Pivot Table Based Off Multiple Pivot Tables

Sep 5, 2006

Is it possible to create pivot table from another multiple pivot table.

Example: I have two diff pivot table "Income" and "Expense" as well
and I need to preapare new pivot table using with those two pivot table

View 3 Replies View Related

Can Pivot Table Be Created From Several Other Pivot Tables

Mar 5, 2014

I have 12 months worth of data in twelve separate workbooks each with a pivot table, I have copy/moved the pivot table tab from each into one workbook so now I have a workbook that consists of 12 tabs each with a pivot table. What I would like to be able to do is create a summary table with the full years data; where I am running into problems is that each months table has slightly different row and column counts and labels making any formula like =sum([sheet 1 cell a1]+[sheet 2 cell a1]) problematic.

View 3 Replies View Related

Pivot Tables: Pivot Table Layout

Oct 14, 2003

if there is a way to display a table as column percentages but have the totals as raw numbers.

View 9 Replies View Related

Show All Pivot Items In Pivot Tables

Jun 19, 2008

I've got 4 pivot tables (all derived from the same base data) on 4 separate worksheets. I've been able to (with this help of this site) to use VBA to hide pivot items on all of these sheets using a list on a user form. Hide/Show Pivot Table Field Items. Hide Pivot Table Fields Pivot Items by Criteria

I now need to be able to show all the pivot items on only 3 of the 4 pivot tables, with the 4th pivot table being left untouched. For ease assume that my sheets are sheet1, sheet2, sheet3, and sheet4. The tables I wish to update are on sheet2, sheet3 and sheet4. The pivot table on each sheet is called "PivotTable4" and the pivot item is called "Business". The pivot item contains 12 business names (Business1, Business2 etc etc)

Is there an easy way of doing this? I've spent the day looking through the internet and various "Dummies" books but with little success, I fear that I'm obviously below even Dummy level

View 5 Replies View Related

VBA - Adjust Pivot Table Included Fields To Match Another Pivot Table

Mar 14, 2013

I have a worksheet with two pivot tables, one of which is visible to the user. Ideally, the user should be able to change the "Row Label" field settings of the visible pivot table and then press an "update button" that then adds the same field to the second pivot table.

Ideally, the ordering of the fields should also be made similar between the two tables, though this is of less priority.

I imagine it would be something in the style of:

"If number of Pivot1 active row label fields = X then
Pivot 2.AddRowLabelField = Pivot1.RowLabelField(X)
end if"

View 1 Replies View Related

Refresh Pivot Fields

Aug 7, 2006

The code to make all pivot fields in the "PivotTable1" equal exactly as chosen to the ones in "PivotTable2"? Cheers.

View 9 Replies View Related

Formatting Pivot Table Fields

Jul 20, 2009

I'm trying to loop through all pivot fields in a table and change the format to be 0 decimals and comma seperated.

Here's my

View 3 Replies View Related

VBA Hide Pivot Page Fields

May 15, 2013

How to hide the Pivot Table pagefields . Because I have so many filters on my pivot table to get it where I want it to be, I chose to use some PageFields. Trouble with these, is they look awful on my report which will be issued in PDF format so not an interactive field at all.

When I use the PF.Orientation =xlHidden on a page field, it affects the accuracy of the report

If I use this on a rowfield, no problem.

Is there a VBA way to hide pagefields?

Code:
Set PF = pt.PivotFields("Hours Code Effective")
PF.Orientation = xlPageField
With pt.PivotFields("Hours Code Effective")
.PivotItems("Yes").Visible = True
.PivotItems("No").Visible = False
.PivotItems("(blank)").Visible = False

End With
' Set PF = pt.PivotFields("Hours Code Effective")
' PF.Orientation = xlHidden

View 6 Replies View Related

VBA To Set All Pivot Fields To Default Values

Mar 14, 2008

I am finishing up a macro that manipulates a pivot table and creates a file for us to run. But we all keep this pivot table up a lot, and usually keep a lot of the data filtererd in it.

Is there a way to set all of fields in a pivot table back to their default values like when you first open up the workbook?

View 9 Replies View Related

Pivot Table - Hiding Fields

Jun 22, 2006

I have a question regarding pivot tables. how do I hide a field but still maintain that filter? I have a field in the Column Fields titled "International". Right now I've filtered out only the YES entries, but I don't want to see a "YES" column beside each. When I try to hide the column the filter is reset and all entries, international or not, are seen. Can I hide the column but maintain its filter?

View 6 Replies View Related

Eliminating Non-correspoding Pivot Fields

Aug 1, 2006

What is the easiest method to eliminate non-corresponding items from appearing in pivot fileds. For example, if I select "Texas" and "Arizona" from my state pivotfield, the "City" pivotfield next to it should only display cities within these states, and not every city in every state within the original data.

I presume this involves dynamic ranges and also some sort of array matching?

View 4 Replies View Related

Create List From Where All Fields Are Visible?

Jun 19, 2013

I am trying to create a list from where all the fields are visible and you can just click on them.

It is not a drop down list. It's a list where all possibilities are visible and you can just click on them.

It is probably not even done with a list or with validation data.

View 1 Replies View Related

Using Calculated Fields In Pivot Instead Of Changing Raw Data First?

Dec 31, 2013

I created a nice excel file with some cohort analysis regarding the number of months customers of different cohorts stay with a company. Basically I do a little manipulation on the raw sign-up data sheet and then run a pivot on it.

I want to see the cohorts in two ways:
1. number of customers.
2. $ from customers.

I have the first 1 and I want to get the second one without going through the same procedure again (i.e. manipulating the raw data). In order to get the $ terms, all I need is to multiply a $ column in each row in the columns that indicate the number of months that passed since a customer joined (see the attached example file please). When I try to do it with calculated fields in the pivot table, Excel multiplies the total number of customers with total $ from them all put together, which is of course wrong.

Any way to achieve what I want without having to created another data sheet just for $ terms?

I believe the attached excel file: dummy_for_cohort.xlsx

View 6 Replies View Related

Pivot Table - Add Multiple Fields To Values Tab

Jan 3, 2014

I was wondering if it were at all possible to add multiple columns to the values portion of a pivot table at once, instead of individually dragging. When you click on them, it auto-sends them to Row Labels, which I don't want. I have a bunch of colums I want to add to Values and don't want to waste a bunch of time dragging them individually.

View 2 Replies View Related







Copyrights 2005-15 www.BigResource.com, All rights reserved