How to create a list of all ticked/non-ticked filter in an excel pivot table - excel

This, I hope, is a really simple question but it might not be possible.
In excel, I have used multiple filters in a pivot table, I now want to create a list of the options ticked from the various filters.
How can I create a list/copy all the ticked (or un-ticked) boxes. I have around 800 filters with about 250 boxes ticked.

The Manual approach:
Select a cell in the PivotTable. Then from the PivotTable Tools>Analyze tab use the Select icon to select the entire PivotTable. Copy it and paste it somewhere else. Drag every field out of it, leaving just the Customers field in it as a Rows field. There's your list.
If you add a slicer, and connect it to both PivotTables, then any changes to the Customer field in your original Pivot will flow through to this new one.
The VBA Approach:
See my UDF at https://superuser.com/questions/1254703/add-slicer-selections-to-sheet-in-a-list-excel-vba/1255885#1255885
And if you want a way to 'recall' a filter, then check out my answer here:
Pivotfields multiple filter

Related

How can I generate a pivot table using this data?

I have this table:
Is it possible to make a pivot table to present the information like this?:
Thanks!
Sure it's possible. As shown in your example, you just need to change the special character "✔️" by the number 1 using "ctrl + f". Then insert a Pivot Table with the data. And finally, create a new column named TOTAL and add the "=sum()" formula to count the items from each row. Something like that:
You are going to need to move this data from the word doc you are using into an Excel worksheet, in order to generate a pivot table.
format your data like this in Excel
To start out creating a pivot table, make sure that all rows and columns are selected and record (row) must not be obscure or elusive and must be making sense. Navigate to Insert tab, click PivotTable.
You will reach Create Pivot Table dialog box. Excel fills in data range from first to last selected columns and rows. You can also specify any external data source to be used. Finally choose worksheet to save the pivot table report.
The pivot table should appear. You can then populate this table with data fields which will pop up on the right hand side. Enable the fields you wish to compare in the pivot table report.

Create VBA for selecting a slicer selection

I want to use my excel and pivot data as a template. Therefore, all linked data to pivot tables and slicers are emptied when the template is created. After generating the template my slicer setting is lost. Is there any way to make a mandatory and permanent selection for pivot tables? Can you suggest the VBA code?
I want to select different departments within my "Department (Name) Column. For instance a department named "Public Amenities" within the "public Amenities sheet.
Thanks!
enter image description here
Assuming you don't even know where to start, I would suggest first you use the macro recorder to create a slicer, and select some items.
You could use something like this:
ActiveWorkbook.SlicerCaches("NameFromSlicer").SlicerItems("NameFromItem").Selected = True
To select a specific item in a previously created slicer.
And also
ActiveWorksheet.PivotTables("NameFromPT").Slicers.Add
To add a slicer. Note you will have to give the paramethers to the "Add" method.

Copy Filters from one PowerPivot PivotTable to another

I have 2 PivotTables that were created from PowerPivot connections. I would like the second PivotTable to change based on a selection the user makes on the first PivotTable. I have some VBA background, so you don't need to write the whole code but point me to the right functions/structure.
If you use slicers, you can simply link both tables to the same set of slicers. You can even have multiple copies of each slicer.
It's the same in all versions of Excel since 2010. Here's a link.
Edit: Adding information from my comment below here.
You can use this technique even when you're explicitly using a filter on the pivot table, whether by adding a field to the Filters section, or by putting that field on the row/column labels and then limiting the selection based on that row/column header drop down. You can mix and match these as well, with Pivot1 having the field in question in the Filters section, and Pivot2 having the field in the Rows section.
Just create your two pivot tables as normal, and then connect both to the same slicer. This slicer can be hidden on another sheet that is not displayed to the end users. This solution is much more expedient than the VBA solutions I've seen.

Filter Pivot in Report Filter for a range of values

I have the following issue. I have large dataset with product codes, dates at which they are shipped and their tranport method.
I would like to create a pivot of the product code on the left and their transport method on the top. But as variable I would the pivot to only present a range of dates. These dates are presented in the form yyyyww. (example: from 201420 to 201505).
I have a column where each of the individual year and weeknumber as presented, so they could be looked up from there. This also allows it to be a variable.
How can I get this pivot to present this information between a date range?
In Excel 2010 and later you can insert a slicer for any field in the data source and click the values in the slicer that you want to include in the pivot table. Shift click to select contiguous slicer values, Ctrl-click to pick non-contiguous slicer items.
As an alternative to slicers, you can drag the desired filter columns into the filter pane.
The screenshot shows the column names in the filter pane and how the filters appear above the pivot table. It also shows slicers to the right of the pivot table. A pivot table in Excel 2010 and later can have both filters and slicers. Earlier versions can only have filters.
The following screenshot shows what happens when values have been clicked on the slicers. These selected slicer values are mirrored in the filter settings (and vice versa). So, a slicer is just a user-friendly way to select one or more filters for the pivot table.
Please note that you would normally only use one method: either slicer OR filters. Choose the one that you like most.

Master PivotTable Filter

I have 6 pivot-charts on many worksheets (each worksheet corresponding to different individuals), all pivot-tables have a Month filter. Instead of clicking on each individual filter to update the pivot-table (and corresponding pivot-chart). Is there a way of creating a 'master' filter button so that all filters are updated?
Let me know if you require further information.
You can accomplish this by using a slicer. Slicers are similar to filters, but look a little different and can be associated with multiple pivot tables. This means you might want to make a "front page" or similar area with the slicer on it so it is obvious that the one slicer controls the month filter for all pivot tables.
You just insert the slicer on the page, then click on Report Connections and connect it to each pivot table.

Resources