I have macro to refresh the pivot data - however, upon refresh all the fields with the 'latest' data become expanded as by inherent design. I'd like to collapse all the rows with the exception of the last, and latest, entry.
Any assistance would be appreciated!!!
Related
I have a Power Query connection that's pulling data from a CSV file into an Excel table. I have then added columns to that table in Excel and added some data to those columns manually.
The issue I have is that whenever I refresh the Power Query, the 'manual' data rows don't stay lined up with the Power Query rows. Specifically, it seems that the manual data all gets shunted down a row in relation to the Power Query data, although even that isn't completely consistent.
I tried unselecting the 'Preserve column sort/filter layout' option in External Data Properties, but that went horribly wrong, as it just removes all of the manually added data from the table completely.
The Power Query itself is very simple, it just takes the CSV data, promotes the headers, changes a couple of types and removes a few columns - there's not even any data filtering going on.
Any assistance much appreciated!
I have an Excel Workbook with two tabs - soon to be more.
The first tab is a large table containing a lot of data, the additional tabs (what I am calling view tabs) will essentially be selected data from the first tab - a sub-set of the table's columns - with various ordering.
To achieve this I am currently using a couple of pivot tables on the second tab - as I say this is the first of the 'view' tabs.
The pivot table does not need to do any summing or counting or anything like that so everything is just shown in tabular format.
The pivot table sorts alphabetically on the first column automatically - which is perfect for my needs.
I also have the following code inserted into this first view tab so that the pivot table is updated with the latest data from the 'Data' tab whenever the view tab is opened.
Private Sub Worksheet_Activate()
Me.PivotTables(1).RefreshTable
End Sub
When I edit a value in the data in the Data tab that is displayed in the first column of a pivot table in the view tab and then I view the view tab, the edited value is shown as updated in the view tab BUT it is moved to the bottom of the list - i.e. any edited value moves out of the alphabetical ordering in the first column and moves to the end of the list.
Editing data in any other column on the Data tab works fine.
I have an example xlsx demonstrating the problem, but it seems you can't attach files to SE posts (I hadn't noticed that in all these years!) - if anyone can point me to somewhere online that I could upload the example then I can link to it here.
As per #pnuts comment, this was simply a case of applying a sort to the first column of the pivot table via the filter menu.
Now whenever the pivoted source data changes, the data in the pivot table updates and the data order is preserved - exactly as required.
(It still seems odd, however, that Excel automatically sorts the data into the pivot table in the first instance - rather than listing in source data order - but does not maintain that ordering unless the pivot table data itself is explicitly sorted).
I have a very strange problem. I built a macro that refreshes several PivotTables. Everything is fine except for one PivotTable where one value "AGHF21A#BFF" in the source gets changed into "54r" in the Pivot Table. Other PivotTables also get data from this source and they all get the correct value. This only happens with this specific case from a list of 30 products, this is the only one that changes the value in the Pivot Table.
I tried everything Excel would allow me do. I changed the format to string/general. I tried to do a calculated field. The strange thing is that if in the source data I add let's say any character, remove any character or change any character then the pivot table does recognize the code and does not change it to the strange code "54r." I have never seen any Pivot table do this before.
The Macro downloads different reports into Excel and then it refreshes the PivotTables. Any help would be very appreciated.
So my situation is that I am trying to create a set of textboxes that are in a figure that represent a set of information that are easily updatable but the problem is that since I am using a pivot table to organize the information and get rid of replicates, that when the pivot table is updated, these textboxes start displaying incorrect information.
In the example I have put together (the first image being the initial situation, and the second image being after the pivot table is updated) the first part of the figures in supposed to be the month and the second line is supposed to be the day of the month. I used a pivot table so that information could be updated and replicates would be removed. When I updated the pivot table, a line early in the pivot table was added due to new information and now all the textboxes are showing incorrect information.
Is there any way with pivot tables that I can prevent this from happening and keep the correct information showing in the textboxes or is there another way I can do this?
This is the first image where the initial situation is:
This is the second image, where the pivot table was updated and the textboxes in the figures are now not showing the desired information:
I currently have a pivot table on one sheet and a list of data on another sheet. I wanted to put both next to each other so I moved the pivot table to the left of the data set without a problem. However, every time I use a filter on the pivot table, it prompts me to ask if I want to delete all the other data on that sheet. Clicking okay clears the whole sheet but clicking cancel doesn't apply the filter. Any idea how I can get around this?
The only way around this is to make sure they do not overlap at all ... because if the pivot expands / contracts it affects the sheet and thus the table. I do think a possible work around at least in my quick testing is too keep the table on another sheet, but create another pivot of that table on the same sheet. Then Simply put the columns as columns so it looks like a table.