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...
Related
I don't have any concrete example but I have a PowerPivot table containing nearly 2 million lines. Users will work on it regularly and filter down until they get the data that they want. Filters will always change depending on the user and on the information that they are looking for.
My question is: is there a way to extract into a simple table or pivot table the information from the PowerPivot BUT the active filtered information only?
So let's say for example I have table1 containing 2 million rows. I apply different filters in the table to narrow it down to 10,000. Is there a way for me to extract those 10,000 rows specifically in a simple Excel table or pivot table?
The quickest and easiest way is to copy the table, and paste into a Worksheet.
Right click the intersection of Row / Column Headers and select Copy:
Only the visible filtered rows will be copied.
I want to extract the data from a specific column in a Pivot Table and show it in a regular Excel table. Is this possible? It should update automatically when there is new data in the Pivot Table.
I've previously written some code to slave a Table to a PivotTable, so that any change in the PivotTable's dimensions or placement will be reflected in the shadowing Table's dimensions and placement. This effectively gives us a way to add a calculated field to a PivotTable that can refer to something outside of that PivotTable. If the PivotTable grows, the Calculated Table will grow. If the PivotTable shrinks, the Calculated Table will shrink, and any redundant formulas in it will be deleted. That Table can easily reference the PivotTable, or it can reference something else based on information in that PivotTable.
See Select Newest Record and Create New Table of Unique Values in Excel
These sample images show two things:
the Table will track the PivotTable in terms of size
You can implement any formula logic you like inside that Table. For instance, here I'm doing a lookup on the source Table based on the Reg No displayed in the PivotTable.
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.
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.
I have a Pivot Table which I have entered a date field into the Page Fields area to filter the data in the page.
However, I only have the option to select individual dates.
I want to use a date range. How can I do this? Or Can I do this?
Here is a classification by data source of how you can get / use the
Analysis Services
If you are using Analysis Services data, then I think you a breakdown of a date structure (if the dimension and the field is classified as such) by default.
(Hidden) Excel Sheet Data Source
Date Structure breakdowns are not readily available for data from another (usually hidden) sheet in the workbook.
You will have to create additional columns that mark ranges and then you can use it.
For example, lets say you have a SalesDate column. In your source, you should break the column further down so you get the the following columns
SalesDate
SalesYear
SalesQuarter
SalesMonth
SalesWeek
Then you can use these to effectively create ranges. If you have custom ranges you can put them here as well.
External SQL Query
If you are using a SQL Query, you can create computed columns that do these calculations for you. If you have the ability to modify the SQL Query, you can add the columns to the query.
In case you don't have the ability to modify the SQL, you can create Calculated field in the Pivot Table structure.