I am working on Excel 2007 and I need help with creating a pivot table.
My excel sheet looks some what like this
Name Date Team Location
John 2011-05-01 Project NY
John 2010-10-12 Information NY
John 2010-02-04 Development CA
Sam 2011-05-01 Development CA
Sam 2010-01-01 Project NY
Sam 2008-01-01 Programmer NY
Brad 2011-04-03 Project NY
Brad 2009-01-01 Info NY
Brad 2007-01-01 Designer CA
Now, if I create a pivot table based on the data above, and put a filter on the "Date" to see who worked at where aka "Location" under what "Team", let's say between "2010-01-01 to 2011-12-31"
Then it will count "John" three times, "Sam" twice and "Brad" once. And total of 6 employeses working during "2010-01-01 to 2011-12-31"
Now I want to remove these duplicates so that if "John" is counted once, he won't be counted anymore, even if he switched to different "Team" or "Location" so I can count for the total number of employees during "2010-01-01 to 2011-12-31" without any duplicates.
I understand that if I want to edit the pivot table and create unique value to remove these duplicates, I need to add another column. But I need help creating this column.
Could anyone help me out here?
Thanks a lot guys!
Anyway, tell me if this would work for you.
1) Sort your spreadsheet by 'Name' first and by 'Date' second.
2) Add an extra column called 'Old Position'.
3) Go down the sorted list and for every name with duplicate rows that you encounter, leave the first occurance alone, but add an 'X' to the column 'Old Position' for all of the older duplicates.
Now you can filter by keeping rows that have their 'Old Position' column not equal to 'X'. This should give you just the most recent positions for all employees.
As long as there are not two distinct employees with the exact same name, I think this should work (otherwise try to use an employee id or somethings unique to each individual instead of their name).
Put "Date" in report filter, "Name" in row labels, set filter for "Location" as "NY" then "Location" can in placed in either report filter or row labels depending on how you want to see data.
Related
I have two excel files, One with product ID and description in English. Other one with the same ID and Description, but in French, but the IDs are not in same order in both files, they are listed randomly but both have the same IDs. (there are over 10000 products in the list.)
I want a formula such that I can find all the products by it's ID, Match ID with the IDs in the second file (the French one) and paste all the French description right beside English description column.
How can I make this process faster, I would have done it manually but there are 10,000 items in the list so it would take a lot of time for me.
You can Use Index- Match
Where your ID is in Column A and Description is in Column B
=INDEX([Book2.xlsx]Sheet1!$B:$B,MATCH(A1,[Book2.xlsx]Sheet1!$A:$A,0),1)
Or you could use Vlookup IF only two Columns involve
=Vlookup(A1,[Book2.xlsx]Sheet1!$A:$B,2,0)
I have an Excel table (which is formatted as table and named as "table 1"). So the table columns are named like #LastName, #FirstName and so on.
This table contains information on when people attended a seminar. They're able to attend a number of seminars but also can attend a single seminar twice or more often.
I now want to find out, when the last date was , when a person attended a special seminar.
Lets give an Example:
Table:
#FirstName #LastName #Seminar #Date
Frank Mayer Workshop 1 2017/01/15
Frank Mayer Workshop 2 2019/05/27
Sabine Adams Workshop 1 2017/01/15
Volker Mueller Workshop 1 2017/01/15
Frank Mayer Workshop 1 2018/04/23
As you can see from this simple example, Frank Mayer attended Workshop 1 2x. All others attended each Workshop only once.
Goal is to have a list of Name, Workshop and last attendance. So the final list should look like:
#FirstName #LastName #Seminar #Date
Frank Mayer Workshop 2 2019/05/27
Sabine Adams Workshop 1 2017/01/15
Volker Mueller Workshop 1 2017/01/15
Frank Mayer Workshop 1 2018/04/23
I really have no idea how to solve this with Excel Formulas, since there is not only comparing dates, but also find double entry which differ only with the date. If possible, I'd like to NOT use VBA programming.
Do you guys have any idea? My table has 1500 lines, so doing that by hand is not an option...
Maybe there is a way to create a new sheet or table with the results?
Best Regards
Olaf
A more dynamic approach
(i.e. you would not have to go through the entire process each time more data is added.)
Add a helper column with name+last name+workshop per cell named e.g. "ID". Use either Concatenate or =Name & Lastname & Workshop to consolidate
Create a pivot table from your table with the following field-list:Rows: Add "ID" , Values: Add "Date" and change the value field settings (right-click) to "Max of Date"
Remember to refresh the pivot table when adding new data or change the pivot settings to update automatically when opening the workbook.
There are a thousand and one ways to do this and you might be surprised how easy it is to do manually too.
If you're reducing the table, meaning, removing rows from the table; then you could...
Add a helper column which concatenates the first name, last name, and workshop.
Then sort by this column and by date decreasing values.
Remove duplicates based only in the helper column.
Remove the helper column
Sort as desired
The trick is the sort. Sorting the helper column groups the repeat names per workshop and including the date by decreasing values ensures the most recent is at the top. So when you remove duplicates, the first occurrence will be the most recent and will be retained but subsequent entries well be removed.
I'd advise you to use the "Subtotals" Excel feature, choosing the Max function.
You might encouter problems as you need to give a single column in the first entry of the dialog, but this can be solved, creating an extra column, appending first name and last name, and basing your that (hidden) column (sorry for the Dutch, I don't have an English Excel):
The corresponding entries for the other columns can be found using basic search formulas (Match, VLookup, ...).
I would recommend using PIVOT as the simplest and fastest way:
I'm trying to create a PowerBi dashboard from SharePoint list. The problem is one of the column contains "People or Group" where it intakes multiple names. This column is read as a table in PowerBi and when expanded, returns empty though there is data. Similarly, I have another column with "People or Group" but it only takes one name which works fine when expanded returning values.
Sample Data
ColA ColB ColC
1 John Doe John Doe, Tim Apple
2 Tim Apple Tim Apple, Steve Cook
3 Steve Cook Tim Apple
From above, ColB works fine for data extraction but ColC return empty without any data.
I've attached a PowerBI screenshot for reference .
I was able to figure this. I used the column FieldValuesAsText to convert all the lists and tables as regular text without any issues. This column converts multiple columns at the same time, thereby saving a lot of time too...
I have a homework assignment where I have to merge data of two excel sheets by performing some cleansing operations using formulas.
Sheet 1:
OrderID | Full Name | Customer Status
1001 Waqar Hussain Silver
2002 Ali Moin Gold
Sheet 2:
OrderID | First Name | Last Name | Customer Status
A1003 Junaid Ali 2
A2004 Kamran Hussain 1
Sheet 3:(Combined Sheet) - Expected
OrderID | Full Name | Customer Status
1001 Waqar Hussain Silver
2002 Ali Moin Gold
1003 Junaid Ali Silver
2004 Kamran Hussain Gold
There are probably a lot of ways to do this. First make sure the data is cleaned. If you are already 100% positive the data is clean you can skip this step. If you aren't sure it's better to be safe than sorry. For each column create a new column using the CLEAN and TRIM functions to remove any non-printable characters and any extra spaces. Something similar to =TRIM(CLEAN(A2)). Then drag the formula for each cell.
After this in order to merge the data together we need something to join on. The full name seems to make the most sense. On sheet two we'll write a new function to join the first name and last name together. The =CONCAT formula should work.
=CONCAT(First Name, " " ,Last Name). Make sure to note the extra space added by the quote. That way it matches the Full Name from Sheet 1. Looks like we'll also need to strip out the letter from Order ID in sheet 2. I'm going to assume that all Order IDs are 5 characters long. If this isn't true then you'll need a different solution. You can use =RIGHT(A2,4). This will grab the right 4 characters from the text string.
At this point let's create a distinct list. Copy the Full Names from Sheet1 and Paste them on to sheet 3. Copy the Full Names we created on Sheet2 and Paste VALUES onto sheet 3 below the full names from sheet 1. Then select all the rows in the column and go to the Data tab. Click "Remove Duplicates". This will now generate a distinct list of values.
We can now merge the data together using an INDEX MATCH. There are lots of great tutorials on how to use INDEX match in combination. It's a little long to explain on this thread, but this is a great thread explaining how it works. It's worth taking 10 minutes to fully understand it because it is a formula you will use thousands of times throughout your life.
https://www.deskbright.com/excel/using-index-match/
Let me know if I can clarify anything.
Best,
Brett
Currently I have a database that has 2 variables:
Fund with an ID attached to it and
Investor with an ID also attached to it.
The example attached, has 4 funds and 4 investors.
An investor can invest in 1 to 4 funds.
I have a VBA function that transposes the data into an "X & Y axis" format.
If there is a name "Ben & Jerry Fund" and "Ben" is present, it should show a quarter entry for that investor name but if the investor does not invest in the fund, it should just be blank.
Question: Is this possible?
Using the =IF(AND( function would not be possible here since there's so many funds and investors in the database.
Figure 1 shows the data reference (before transposing).
Figure 2 is the desired result.
If the purpose is to have a dynamic report. I mean if you want to append more years and avoid operative process. Follow this steeps:
Use "Format as table" for your data. This will allow you to append more data later and it will refresh the functions by itself.
Create a field to extract just the quarter number in the field [Quarter] with =MID([Quarter],1,1)
Create a field to extract the year =RIGHT([Quarter],4) this will allow you to use this field as a filter for future years
Create a pivot table using the new table then organize the data:
*Filter([Year])
*Rows([Fund Name], [Fund Id])
*Columns([Inversor], [Inversor ID])
*Values ([Quarter])
You will see the numbers for the quarter. If you want to see the letter "Q" you can change the format with right click, and select "Number Format...". There in "Custom" change to Q0
Here is a Tutorial about format as table and pivot tables that I made a few months ago. I am sorry it is in Spanish but I am using the Excel English version.
=IFERROR(INDEX($E$3:$E$12,SMALL(IF($C$3:$C$12=L$5,IF($A$3:$A$12=$K7,ROW($A$3:$A$12)-ROW($A$2))),1)),"")
Building an array of row numbers for INDEX and grabbing the first match (smallest row) based on the 2 if statements...
A pivot table can achieve what you want?