PivotTable Nested Columns - excel

I am interested in grouping columns together by a common factor. Below is a basic example:
I'm interested in nesting the vehicle brands under the categories Luxury and Frugal. Thus making them collapsible like the rows can be. This is a basic example whereas the data I'm planning to work with this has thousands of rows of data similar to a layout as these rows and possibly 50-100 columns that could be collapsible into 5-10. Any guidance would be appreciated.

As has been suggested, adding Luxury/Frugal as a column in your source data would achieve what you require. However that would require substantial rearrangement, make your source data occupy a much larger range and not give an ideal result because adding just the one column, while allowing filtering by column in the PivotTable, each filter view would still show all columns (though mostly blank).
So completely "flattening" the source data may be a better choice, if to rearrange the source data at all:
The fields arranged like so:

Related

Classification and Grouping of Sorted Data

I have a Dataset H3:J12 where components are classified based on Type. I have summed the count for similar components and sorted based on Count with Unique and Sort formulae and the result is L3:M7.
In my actual case, there are several thousands of such components which are sorted as in L:L and now I would like to add the Type column next to the Component with sorted Count as shown in P3:R12. Is it possible to extract them directly from L3:M7 or directly from H3:J12, as I will not be able to do them manually.
Screenshots/here refer:
Mechanical approaches include pivots, VB, etc. However, you could consider a more dynamic approach that doesn't require constant updating / refreshing (of code, pivots, etc.) whenever underlying data is appended/amended.
YES: you can retrieve directly from source data as follows:
=SORT(UNIQUE(C3:D20))
=SUMIFS(E3:E30,C3:C30,H3:H17,D3:D30,I3:I17)
Notes:
Could make this averageif(s), countif(s), percentile etc. etc. - another
significant advantage over alternative methods (VB, pivots, etc.), besides dynamic nature, is the flexibility re: measures; restrictions present in pivots are substantive in relation to Excel direct calculation
Disadvantage is inability to automatically chart data using pivot chart functionality that accompanies pivot tables
See linked sheet opening line for conditional formatting sample used to recreate 'look / feel' you might otherwise be losing out on with this approach
It seemed as though you were almost there! I'm not sure what relevance other tables have (ignored this in light of question).

Excel pivot table with ranking

I'm in the processing of creating a report for the company I work at that has a rather complicated survey export file that needs to have the data extracted in meaningful ways.
The table headers are as follow https://docs.google.com/spreadsheets/d/1Et9Pg6k9CJA3HTO0aHcnSnOWVU05bmHYUsPS0wB2Nr8/edit?usp=sharing
It has respondents listing there top 3 most important options and the rest are left blank.
If anyone can help me figure out a way to potentially summarize this in a pivot table that would be great.
You're data is in a crosstab. Pivot's don't like that kind of layout. You need to unpivot your data.
If you've got the PowerQuery add-in installed (or have Excel 2016 or Excel/Office 365 subscription) then you can use PowerQuery to do this. Google "PowerQuery" and "Unpivot" and you'll turn up a whole heap of videos.
Otherwise you can use VBA such as my Unpivot routine I've previously blogged about at http://dailydoseofexcel.com/archives/2013/11/21/unpivot-shootout/
As always it depends what questions you want to ask in your analysis. Here are two suggestions.
What are the commonest first/second/third choices?
This assumes that the ranking is important, i.e. the first choice is ranked significantly higher than the second choice, so you want to analyse them separately.
You could add three extra columns to your data using this formula to convert the first choice to a single variable with 11 categories
=IFERROR(MATCH(COLUMNS($A:A),$A3:$K3,0),"")
in L3 and likewise with the second and third choices in M3 and N3.
in the event that a respondent (row) has less than three choices, it will give a blank for the second and/or third choice.
What are the commonest choices regardless of ranking?
This assumes that the ranking isn't so important - you just want to know which columns have been picked overall.
=INDEX($L$3:$N$10,INT((ROWS($1:1)-1)/3)+1,MOD(INT(ROWS($1:1)-1),3)+1)
In N3. This would have to pulled down for 3N rows, where N is the number of rows in the original dataset.
Then it would be a simple case of setting up pivot tables or charts for the four new variables.

compare two tables then sort them in excel

I have two tables with the same data but in different rows, I want to sort them in front of each other. each duplicate row in front of its duplicate.
attached photo
In a new worksheet, copy the code data from one table and append to that a copy of the code data from the other. Apply Remove Duplicates to that column and sort ascending.
Now use that sheet to look up (VLOOKUP Description, Uom and Unit Price from one of your tables into three separate columns (say 2,3,4) and lookup up same fields from the other of your tables into a further three columns (say 5,6,7).
Wrap both formulae in IFERROR(....,"") to reduce noise.
I take it any numbering will be applied independently in a new sheet (ie No. is not required to be copied to there).
Incidentally you have a lot of unconventional hyphens (eg L-80 is never normally written other than as L80), m for OCTG as a unit of measure leads to many problems and with competent staff a structured catalogue could be advisable for a high value of stock and long-term storage.

Pivot Table with multiple rows all having the same level hierarchy

I have imported a bunch of data using PowerQuery into a single table and am building dashboard reporting. I have been using Pivot Tables to build my reports, which has worked fine so far.
However, I've come to a point though where I want to simply show the count of multiple columns (calculated fields). So I have column A,B,C,D, and want to show the count each of each. But, I don't want them to be subsets (or children) of one another, and I don't want to build a bunch of Pivot Tables (file is already getting pretty big, and I want them row by row for easy viewing). Any suggestions?
Also, I am using the "Columns" field already to show the counts by certain weeks (week one, week two, etc.).
Thanks,
-A
Thanks for the follow-up. Within PowerPivot, I have four calculated fields/columns that are True/False for each column. I want to know how many times each of those columns were marked "True" (I can rename the "True" field to distinguish between which field it's referencing). But I don't want four pivot tables. Right now I can only think of making four pivot tables, filtering out the false for each one, then hiding the rows so the "True" values stack on top of one another. If I put all the four fields together in the same Pivot, the three below the first become subsets. I don't want subsets, just occurrence counts.
Does this help provide clarification?
If I understand you correctly, here's an example that shows what you're trying to achieve:
The table on the left has the TRUE/FALSE entries and the PivotTable on the right just shows the number of true items in each of those columns.
The format of the DAX measure to produce these count totals is:
[Count of A]=CALCULATE(COUNTROWS(PetFacts),PetFacts[A]=TRUE)
(Apologies to any parrot owners who may get upset that I have inadvertently re-classified their pets as cold-blooded!)

Excel: Averaging the values from a set of rows, but only include them if they have a specific value in a column

I'm looking for help dynamically averaging the column values of every item in an Excel table that has a given value in one of its columns. Specifically:
I have an Excel sheet where each row represents an entity in a video game I am working on, and each column is a numerical value for different attributes on these entities. Movement Speed, Health, Attack Damage, etc. Each of these rows also has a column where I tag the row with the name of the class that this entity is a part of: "tank", "support", etc. This table has roughly a hundred items in it, and is likely to grow to two or three times that size.
It looks something like this:
What I would really like to do is have, on a separate tab, a table where each row represents one of the classes, and shows the average value of all of the entities that have that class in their "group" column. And I want it to automatically include new entities of that class as they are added to the first table.
It would look something like this, where these values are automatically generated from the data in the first table (I have no problem manually entering the class names, I just need the numerical data to be driven):
I imagine that the solution will be a complex, nested pile of VLOOKUPs and MATCHes and other Excel functions, but I am not really sure how to accomplish this. I didn't even know the proper terminology to search for existing answers to this question, so I hope that it isn't too redundant. Thanks very much for any advice you have!
Version: I am using Excel 2013.
I think all you need is a pivot table. (its been around since the 90s?) - and very useful!
there are lots of ways of refreshing etc depending on where the data comes from
http://office.microsoft.com/en-us/excel-help/pivottable-reports-101-HA001034632.aspx

Resources