I've been trying to build a pivot table that uses keys from multiple columns.
This would be the source table (Items 1,2,3 columns represent the keys):
[
This would be the resulting Pivot Table (The pivot table consolidates key "A" even though it is placed in other columns) :
]2
Sorry if this is a terribly easy one to solve.
Thanks in advance.
You need to use a consolidation range pivot table. Alt+DP, then choose consolidation ranges as the source and add each pair of columns separately. You'll need the pairs of columns to all have the same headers.
Note also that consolidation range pivots are quite limited in terms of what you can do with them.
Related
I have created a a form in Excel for my colleagues to use to populate a table which I use to generate pivot tables for analysis. Unfortunately, given the nature of the data the table is constantly expanding and prone to various blanks. This has lead to deactivation of certain pivot table features (such as grouping) that I need. Is there a way to allow a pivot table range to encompass a large range of rows (ex: 50,000) while still maintaining the features and integrity of the pivot table?
Yes, you can set your Pivot table range to a Named Range:
=Sheet1!$A$1:INDEX(Sheet1!$C:$C, MIN(IF(Sheet1!$A:$A="", ROW(Sheet1!$A:$A), 9E+99))-1, 1)
This example is of a data range where the table is from column A to column C.
The Column A is a Key column in that each record must have an entry there(as I coded it - you can choose differently). As records are added to the table, the pivot table will update it's source range, which is dynamic.
Of course, in order to get the Pivot display to refresh you still need to refresh the pivot table.
Alternatively, you could use VBA in several ways...
I have 5 tables (each table has a Date column)
I want to make a relationship between all the dates of all the tables in the pivot table to do some data analysis.
But unfortunately, the relationship is between 2 columns only
However, i tried to make 1 sheet as the primary sheet, and make relationship with others, but it pops out with error.
Please help.
I would suggest using =SUMIF() and inserting the desired date values manually for the comparison.
It will be difficult to pivot on multiple tables with non-unique keys to summarize on (ie date values aren't unique so how does each piece of data fit together)
You could also build pivot tables for each table first, then combine all of those together
Looking to create a pivot table with the same field for row & column labels.
If this isn't possible in Excel, is there a suitable alternative within excel to accomplish the same result?
Plan B.
Two columns in your source data that are identical, one for ROWS one for COLUMNS.
I saw how to merge two different tables into one pivot but they all had the same order of columns. I have two different excel sheets from two different DBs and I want to merge both into one pivot - they have the same column names but in different order.
Attached is the screen shot of the first table, the second table and the pivot table I would like to have
Found the answer!
One should just attach both tables one right or left to each other and create a pivot table from one source rather multiple.
However, excel then differentiates between A1 and A1_1 for the second table. To solve this I used calculated fields for a new field of A1 and A1_1.
I want to construct a pivot table from a huge data-set. Now I want to construct the pivot table that consists of values based on certain specified conditions, for example, the entries with age>25 will only be populated in the pivot table. How to do that without manually filtering out data from the constructed pivot table?
What you are trying to achieve has no clean solution, I can think of two dirty ones.
Modify the source data/clone the source data and modify that
Modify the SourceData property of the pivot table by code
Option 1 is easier, safer, but not good if you are working with large amounts of data.
Option 2 is trickier, it would require you to change the data the pivot table is using and limiting it to only what you want. To use your example, you would sort the data by Age (descending), programmatically find where does the range of rows with Age >25 end end use only that range as SourceData for your pivot table.
Not nice, but these would get the job one. That saying, I wouldn't use either of these. The pivot table filtering is there for a reason.