Convert columns of categories into multiple rows in Excel - excel

I have a spreadsheet of Chamber of Commerce members that looks like this:
COMPANY CATEGORY 1 CATEGORY 2 CATEGORY 3
Ameriprise Lending Institutions Banks
Country Inn Lodging Hotels Bed & Breakfast
FirstBanc Lending Institutions Banks
Gillespie Fair Events Festivals
That I need to convert—on a new sheet—into this:
COMPANY CATEGORY
Ameriprise Banks
Ameriprise Lending Institutions
Country Inn Bed & Breakfast
Country Inn Hotels
Country Inn Lodging
Firstbanc Banks
Firstbanc Lending Institutions
Gillespie Fair Events
Gillespie Fair Festivals
In a nutshell, I need to produce multiple entries for the Company for every Category that business falls under. Any help would be greatly appreciated.

In data cleaning world, we call this reshaping a data frame from wide to long.
And there's a way to do it in Excel.
Hit this key combination: Alt D P. This will bring up PivotTable Wizard (Yup, not many know this.)
Select Multiple consolidation ranges. Click next.
Select I will create the page fields. Click next.
Select your data range. Click next.
Select the location to show to pivot table. Click next.
You'll see a pivot table appearing. In the PivotTable Field List, untick Row and Column.
You should be left with count of value and a number. Double click that cell. You'll see a new sheet with your converted data table.

Related

Excel table with expandable records

Alright, high chance of this being a dumb question, but I hope someone has an answer for me.
Say I have a report for the sales of my 3 products, Cakes, Cookies and Wine. They're all in tables looking something like this:
Product ID
Total Cookies
Quantity
1
Ginderbread
2
2
Chocolate chip
5
3
Cookie type C
1
Using these tables I made a summary table of how many of each product type was sold, like below.
Category
Quantity
Cookies
8
Cakes
11
Wines
5
However, we finally reach my question: I want to now make it so if I click on a record, I can expand it/get a pop-up/something happens that shows me the breakdown of the sales. E.g f I click on "Cookies" the cookie table will show up in some way, shape or form.
My first thought was that Excel's Power Pivot and Pivot Table system would be the answer i'm looking for, but i'm struggling to figure out how.
If you append all of your data into one table, you can use the drill down feature in the Pivot Table. When you double click the "Sum of Quantity" column, it will show the applicable data for that row:

Top 3 Values for Multiple Categories based on hours in a week

I'm working on a charging matrix where project managers can input time to the top three contracts in each category based on a week to week basis. Right now I have a pivot table with the categories (Production, Spares, Development) with multiple contracts that were charged that week. I manually select the top three from each category and copy into a table where I have formulas creating charge numbers for the project managers to use.
The question is, is there a way I can automate selecting the top 3 contracts from each category based on number of hours for that specific week?
Pivot Table & Charging Matrix
You can use LARGE() to get the top 3 (large(data,1) etc)
Then use index() and match() to get the contract names.
I have made a simple example here, but it will not deal with duplicate results in the hours if they are in the top 3...
There are solutions to that already posted.
If I understand you correctly, you want to automate the process of finding the top 3 contracts under each category and then create the charge number based on the results.
You can do so by creating a new pivot table as demonstrated below, put the Category Name and Contract Name in the Rows field, and put the Hours in the Values field, then right click anywhere within the Row Labels column of the pivot table, go to Filter -> Top 10... -> enter 3 in the second field, then you should have the top three contracts for each category.
P.s. You can choose to sort the hours from largest to smallest, and choose NOT to show the subtotals for each category.
Once you have the list, you can enter your formula (I presume you used a formula) in corresponding cells in column H (as in my example) to create the desired charge number.

Pivot Table Column with Value and Calculated Field row per group?

The more I have to work with Excel in helping our customers with advanced reporting, the more I'm amazed at it's capabilities. That being said, I can't seem to find exactly what this customer wants Excel to do.
Scenario:
We have a datasource which refreshes a worksheet containing many rows and columns of a data export from the customer's database. That worksheet then drives the other tabs' charts, tables, etc.
They want to add a table (pivot) which will take their milestones, sum the (ontime) column, and then take the (rownumber) sum for that area and then divide it so they can see how many projects were on time. Simplified data tab looks like this:
RowNum Area OnTime Milestone
------ ---- ------ ---------
1 North 1 M2
2 East 1 M4
3 East 1 M2
4 North 0 M1
5 East 0 M4
and here's the table they want it to produce.
We can get it to do both using a Sum(value) and calculated field, however we can't get the Sum(value) field to go directly beneath the calculated percentage field. Any ideas?
If I understand correctly, it will be enough to move the Values drawer to your Rows:
If you need to change the order of the values (which one will be at the top etc.), you can do this moving the drawers within Values Window at bottom-right.

Powerview drop filter context on a column

I'm currently working on a power view project where I need to display the numbers of the gross market and compare these to the numbers of a certain customer.
In this particular example, the market has sales in clothing, food, entertainment and electronics. However, in the dataset, the customer only has records for clothing and food (so they didn't sell in the other fields, this isn't missing data).
When I now make a pivot table in power pivot with this data (with the customer as a filter, but with DAX formulas to drop the filter to display the gross market sales) , I correctly get what I want. Quick example:
CLOTHING 11654$ 2541$
FOOD 325477$ 4356$
ENTERTAINMENT 22234$
ELECTRONICS 70124$
Now, when I try to do this exact thing in Powerview, the matrix (with again the customer as filter) doesn't show the numbers for entertainment and electronics, because the matrix is filtered.
Is there a way to drop a filter on rows or columns? I already tried 'show items with no data' but to no prevail.
Thanks in advance!
Try either of these and see if it works:
in the data model --> [Column]-->Advanced --> Summerize By --> Do Not Summerize
add gross market to view filter in power view.

excel group data on one page allowing for sorting but also updating (prefer no VBA)

I would like to create a spreadsheet that has 3 types of data (list of students, list of teachers, list of parking), for example:
Students Grade Parking_Lot
Joe A 1
Carl B 2
Teachers Class Parking_Lot
Mr. Bob Science 1
Ms. Ann Math 2
Name Parking_Lot Position
Joe 1 Student
Carl 2 Student
Mr. Bob 1 Teacher
Ms. Ann 2 Teacher
I don't want to enter names more than once. I figured I could edit the students and the teachers table, and create the parking table automatically. But then I can't sort the parking table as the entries are all formulas. I'd like to be able to sort by parking lot or name. I also would like to be able to change parking lot from any of the tables.
Is there any way to accomplish this without VBA? Am I thinking about this wrong?
Thanks,
Nachum
Example with PT (using Count of Name for Σ Values):
Unfortunately referencing the parking lots with just 1 and 2 makes the PT more difficult to interpret.
Added some clarification.
Position, Name and Grade are Row Labels (in that order from the top), Parking Lot and Class are Column Labels, with Count of Name for Σ Values. I chose Type for the Report Filter and removed all Field Subtotals (click on each Field if necessary and select None) and in PivotTable Options, Totals & Filters removed the Grand Totals by unchecking Show grand totals for rows and Show grand totals for columns. Note that the PT is driven by the source data – not vice versa. Changes to the source data will be reflected in the PT (after Refresh) but you can’t edit data cells for fields in the row, column, or page area of the PT.

Resources