How do I apply data filter to only the table range and not the whole row? - excel

I have got two adjacent tables. When I apply data filter on first table, it filters the whole row hiding rows from 2nd table as well. How do I restrict filter to only the first table range?

To answer your direct question How do I restrict filter to only the first table range? the answer is - you can't.
Reading the comments it seems what you need is to display the filtered table data next to a chart and another table. There is a little know tool in Excel that you can use to achieve this - the Camera Tool. With this you can create a dynamic image of a range and place it where you want. The image updates when a filter is applied to the source range, without affecting the rows on the Dashboard sheet.
Screenshots to demonstrate:
Setup with tables on seperate sheets, and camera images beside chart on dashboard sheet
With Filter applied to Table A
The Camera tool is not on the Ribbon (Excel 2010) or the standard toolbars (Excel 2003). You need to add it using Customisation. (Add to Qucik Access Toolbar in 2010 or Tools/Customisation Menu in 2003)

Unfortunately you won't be able to do that. When you filter, it filters the entire row (something to think about would be how the row number would display if that weren't the case). You will need to restructure your setup if you wish to prevent that (not sure of your particular use case, so sorry I can't give a more specific suggestion).

I had a similar issue, where i had a table I wanted to remain static - like a key, but wanted to filter the main table.
To get around this, I copied the static table, and pasted it as an image. This way, when you filter on the main table, the image remains where you have put it.

A simple workaround for this general issue that others may have mentioned (but I don't see here):
You can't filter just a range (e.g. a few columns in a spreadsheet), but you can sort just a range. And by sorting the range, then deleting some blocks of unwanted cells in the range, then sorting the range back to the original order, you can fake a filter.
A bit clunky, but easy for some jobs if you're careful.

Related

Editing data through a filter in Excel

I have a large imported .csv as a (Query) table in an Excel workbook. I'd like for users of the workbook to be able to select a small subset of that data and update some values without having to play around with filters on the table.
To that end, I've set up a FILTER on a separate sheet, something like:
=FILTER(my_table[some_column], my_table[id_column]="some value")
That pulls in values from the relevant column and displays them.
My question: is there any way to allow users to edit the values retrieved with the FILTER, so that the changes are reflected in the original table? Attempting to edit such a value now just edits the underlying field, causing the FILTER to update and display #SPILL! (which makes sense, since there is not enough free space to render the result).
I've looked at options for FILTER, and thought about writing some custom VBA code to do what FILTER does "manually", and then watch the sheet for updates in that range - but that seems like a lot of coding to do something I would imagine is more commonly needed?
Am I going to have to code this up in VBA? Or is there some alternative approach to using the FILTER?

Excel - Create an indented hierarchy list from a source data set

I'm trying to create an indented hierarchy list in Excel from a source data set.
The source data set has 3 levels (department, municipality and city).
I tried many different formula but honestly I cannot find the right system. Actually it's not even a matter of formula, what I'm missing here it's logic, honestly.
It would be easy to do it manually but since I have more 8000 rows it would be also pretty time consuming.
This is the format of the source data:
And this is what I'd like to achieve:
Any suggestion on how to proceed would be very appreciated.
Thanks,
Stefano
Create a pivot table with your categories in the row field and any
of them additionally as a data field.
Change the report layout to Outline form
Copy / Paste Values
I was able to accomplish this with a pivot table...

Calculated Field

I am trying to create a simple pivot table which will tell me how many community residents reported a particular problem, and what percentage of them reported each problem type. I have a data set with name, and then columns for each type of problem. Here's an small sample of the data set:
I have created a pivot table which sums each of these columns and also provides me the total number of people who reported any type of problem at all. Here's what I have:
I want to add a second column to this pivot table that gives the percent of times each problem type was reported. Sounds simple, but because of the structure of the original data set, I can't figure out how to do it. I can set up formulas outside of the Pivot Table which reference the table, but in doing so I forfeit the ability to graph the percentages on a pivot chart. Any ideas how to create a calculated field for this pivot table?
Just to be clear, what I want is something like this, except all contained in the structure of the pivot table:
Edit: I've changed the example of the data set. Here's an explanation of the pivot table. The values under the "# Reporting Issue" column are counts of all the 1's under each corresponding column in the data set. This meant that I had to add each row to the pivot table independently, as you can see here:
I'm open to the idea that I need to change the formatting of the data set, but I'm not sure of the best way to do it. This was set up initially because it allowed for easy compilation into a data table, but Pivot Tables seem to be a different story.
Hopefully this edit clarifies things.
You need to unpivot your data so that you turn it into a Flat File...something that the PivotTable can consume properly.
The easiest way is to use something called PowerQuery, which is baked in to Excel 2016 but available as a free addin from Microsoft for any other versions. Google PowerQuery Unpivot and you will turn up hundreds of tutorials, such as this one from my good pal Chandoo . PowerQuery looks slightly daunting at first to a first time user, but it is freakin easy once you get your head around how to use it. PQ is by far the best addition to Excel in years. PowerPivot being a close second.
If you can't install PowerQuery, then you can use your current data structure to make a 'staging pivot', and then drag the Values label that will appear in the Columns area to the bottom of the ROWS pane, like in this excerpt from a book I'm writing:
Note that my Year categories are equivalent to your Issues categories.
That will emulate the flat file layout you’re after. All you need to do then is turn this intermediate PivotTable back into a normal range, change that Values heading to Issue, and add a Count heading and you’ve got the flat file you need to build a useable PivotTable.
You can also use VBA. Google Unpivot VBA and turn up hundreds of results, including this blazingly fast code I posted some time back. (Look for the code under the —Update 26 November 2013— heading.)
You can also use the DoubleClick extraction trick.

Hiding certain columns on an Excel table

I've been trying to hide table columns on my Excel spreadsheet. While I can hide entire columns if my data was not in table form, this is something I cannot do because of the information that is underneath the table. For the purposes of this spreadsheet, that information needs to be below. So I can't really convert the table and I can't hide the information that is irrelevant.
Does anyone have a solution for this (this seems like a basic problem but I'm relatively new to Excel)?
You don't mention if that table above moves in number of rows or not but another option is to Data ---> GROUP the rows of the table and then collapse them. Select ALL rows relevant to the table and then click GROUP. To left of row numbers you'll have a line to click (with a + or -) to expand or collapse the data. This will visually look like only the data below is present and you can set print ranges to only look at the data below.
Hope that helps
You can only hide full columns. If hiding the data in the table is important, then the data below needs to be moved to a different sheet. Or, if it only needs to be hidden when printed, then you can change the font color to match the background color.

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.

Resources