Removing grouping from PivotTable columns - excel

My apologies if this question is posted elsewhere, but I believe part of my problem is that I'm not familiar with the terminology. Searching becomes rather difficult when you don't know the keywords to use...
I've inherited a PivotTable that pulls data from an SQL database. Three of the columns in this table are "grouped." By this I mean that all duplicate items in these columns are always next to each other. I want to removing these groupings so that sorting the table is easier. Does anybody know how to do this?
EDIT:My work computer has both snipping tool and paint disabled...So here is a picture of something similar. In my table, all of the data is pulled from the database. The left two columns (in this example) have repeated data, so it groups them like so. These sections are collapsible and expandable.
(source: datapigtechnologies.com)

There is an option on the Pivot Table menu Design->Report Layout->Repeat All Item Labels. This will repeat all the labels when combined with a Tabular or Outline style layout. You will also do better (more than likely) to remove the subtotals as well.
Menu and before
After

I had this issue as well. Remove ALL filtering so you ONLY have those two columns at once. Once all filtering is removed it will allow you to ungroup them and the extra column will go away.

Related

Excel "support": Dynamic chart with multiple selections

I have a set of data that I wanna make dynamically by clicking dropdown and to reflect that on chart. The problem is, I have like small tables (like in Example, Material A, B, C..) with their certain columns, and that is always the same. But how to connect them to the chart so that I only click which Material I wanna?
seems simple but I am not figuring out with more selections like this...
PivotTables is one of the option, I just managed...but I would like to know with functions also.
To answer this problem, actually the best option is Pivot tables. So to put in one sheet all the data (one column for material, other for date and so on..), because theyre in the same shape lets say, and in my case I know I will always get the same shape and set of data, just date/tonnage and registration is gonna be changed. So, hit the refresh button inside Pivot and there you have it.
That looks great using Pivot Charts, without any kind of formulas or functions that gave me a thought at the beginning.
Greets!

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.

Cannot delete a column that contains multiple tables

Whenever I have two tables in the same column, I get this error.
Create a table in columns (ie B1:C3)
Create another table below that table (ie B5:C7)
Right-click on column B
Is the "Delete" option grayed out (unavailable)?
Convert the second table (B5:C7) back to a normal area
Right-click on column B
Is the "Delete" option active (black) now?
It is for me.
I don't understand why it happens but I'd really appreciate if someone could confirm that I'm not alone on this one. This actually seems like a bug.
Unfortunately this is 'behavior by design'. A ListObject (aka structured ) table has many internal mechanisms. The Delete (column) command is not designed to enumerate through all of the ListObjects on the worksheet to see if any intersect with the column being deleted and then spawn subprocesses that deal with deleting table columns specifically while simultaneously keeping in mind how that will affect other ListObject tables. Instead, it simply does not allow the Delete command when more than a single ListObject table is involved.
This is not allowed may be because deleting a column will Shift Cells Why Dont you try deleting by selecting one column of a Table Like this
see the screenshot you can do it if you select one column of a table at a time
Thanks
Try organizing your data in a different way, so these problems don't occur.
There is no compelling reason to have several tables on ONE sheet. If table placement presents a problem with row/column management, consider moving tables to separate sheets.
Tables can be referenced in formulas by the table name. Ditto for table columns, so there really is no reason to keep several tables on one sheet if you need flexibility with row and column management.
Edit after comment The fact that users are working with several tables and cannot be expected to change sheets to maintain data on different sheets can be addressed in different ways:
Educate your user. I'm a big fan of teaching people how to use software. If they understand what they are doing, they feel positive. If you keep them dumb and tell them to "just click there and shut up" they may feel negative.
You may want to re-consider your data architecture. Provide your users with an interface to add/edit/delete records that is independent of where the data is stored. This is 2016. Data input and data storage are not married to the same page.
You are posting your question in a site for enthusiast programmers. A little bit of VBA will separate your data entry/data storage issues, if you are interested to work it out.

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

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.

pivot table appearance

Can we create category for Pivot table field list which appears in right side pane after opening a pivot table.For example normally there will be some check boxes to be selected.I want certain check boxes to come under a group or folder. I see the same functionality is supported in cubes excel reporting.Is it the way you write the queries to pull and do group by
Please help...
I'm going to go with not possible, but someone may have a fancy trick I'm not aware of. Pivot tables are fundamentally 2-dimensional, where OLAP allows multi-dimensional data. There are a number of tricks you can try with grouping data, however, that might get you part of the way to where you want to go. Here's a start.

Resources