Formulas in Excel Pivot calculating custom fields - excel

I have been stuck for a long time with this issue and so far I just calculate this manually.
Problem: For weekly statistics, I need to calculate the first 2 days (weekly) of absent hours. If the person was absent for more than 2 days, he has been replaced by another worker and is not included in said weekly statistics report.
This is a pivot table where yellow values need to be automated.
Thank you so much for any help!

Related

Creating a table in Excel to track performance on 2 data points

I am looking to create an excel table so i can review my colleagues performance on a certain area in work.
The two measurement areas are Resolved Problems and Total time spent. I can pull this info from a dashboard at the end of the week and manually input it to excel.
We have 6 members of the team and i want to be able to input this data as weekly totals per user.
I will then use this data to track trends like who is resolving most problems, who is doing the least. Who spends the most time on problems and who spends the least.
I am not sure the best way to go about this data capture in excel.
Any help is appreciated.
Isn't this something that you would right click, select pivot table, and pivot my person, value column of time, sort by time?

Formula for getting worksheet names based on pivot table results

I have an excel file with 30 time cards, each on their own worksheet, where the only identifier is the worksheet name (ie the employee name). Each worksheet has a first column of account numbers, followed by columns for hours worked for each day of the month, and then total.
From these individual employee tabs I make a Totals worksheet(using =SUM('Adams:White'!B1) and then fill left and fill down. . .)
I then make a pivot on the Totals data and get summary data for the department. (ie we spent 100 hours total on account# 12345) - no problem.
My Question is: How do I write a formula(s) to find which employees contributed to the hours spent on account# 12345. The specific output I would want is a table with a column heading of "12345", and then only the names of those who worked on that account below the heading. (Or all names, sorted, with a second column of how many hours they worked on "12345").
Thanks!
Steve
Since you are feeding your data set into a pivot table, you will need to ensure each record (row) in your data set is reportable. i.e. if Adam and Jane worked on account 12345 for a total of 7 hours and your record in your data set (table) is only one row with the account listed and the total number of hours, it will be difficult and extremely bad practice to attempt to report this by staffer (how do you know that the 7 hours is made up of Adam and Jane, or it could be 14 part-time workers that each put in half an hour).
You have two approaches. One: you could consolidate the data into a master data tab and from there you could have each sheet (Adam, Jane, White) be a report off the master table to show performance by staffer.
Two: Make use of power pivot, if you have Excel 2013+ installed. Here you would create a link for each table by account. Now you would have each rep's hours contributed as a field in the power pivot connection.
Please let me know which of the two seems a better choice and I can assist from there.

Calculating Weekly Average by user given daily data input in excel pivot table

So I started using Pivot Tables a few weeks ago, but I'm pretty decent at Excel otherwise. I hit an issue that should be an easy fix and I don't see it. I have a document that is tracking Key Performance Indicators for my warehouse packing department. I have 2 tabs in the document that matter (Input Log, and Analysis).
Input log is basically copied from a report generated from my warehouse system. Gives me a USER, DATE, HRS WORKED, ORDERS PACKED, ITEMS PACKED. Using a pivot table I want to see the average hours worked by week for each user.
Currently I can only see the Sum of the hours works and the daily average. How do I also see the weekly average?
[InputLogData][2]
I was able to get the workbook hosted on google drive Packing KPI Workbook
If you create the pivot table, but select to "add to data model",
you will see, in the "Value Fields Settings" selection, a Distinct Count item.
You can then do a Distinct Count of the WE column, and add a column to divide the total hours worked by User, by the total number of Weeks. (See the formula in D4: =B4/C4 )
EDIT: If you want to have the results within the Pivot Table itself, you can add a few calculated columns to your input log.
WE per User is the Unique number of weeks each user works. This formula is an array formula and must be entered by holding down ctrl + shift while hitting enter. Excel will place braces {...} around the formula seen in the formula bar:
=SUM(--(FREQUENCY(IF(User=D2,WE),WE)>0))
Hrs Worked This Wk is the hours worked in the week by the user. This is not really needed, but is in there for when I was troubleshooting the calculations.
=SUMIFS(Hrs_Worked,WE,A2,User,D2)
This will be used to calculate the average for the AvgHrs/Wk column:
=SUMPRODUCT((User='Input Log'!$D2)*Hrs_Worked/WE_Per_User)
This can then be used to create the Pivot Table:
In the Pivot Table, the
Total Hrs is the SUM of Hrs Worked
Hrs-Daily is the Average of Hrs Worked,
Weekly Hrs is the Average of AvgHrs/Wk

IF COUNTIFS() on filtered data

Question:
=IF((COUNTIFS(Data!F:F,35,Data!H:H,E2))<=0,"Future",(COUNTIFS(Data!F:F,35,Data!H:H,E2)))
The above doesn't work on filtered data. I've scowered the internet and failed to find a solution after hours of trying. I managed to find a solution for a single count on a different column:
=SUMPRODUCT(SUBTOTAL(3,OFFSET(Data!G:G,ROW(Data!G:G)-MIN(ROW(Data!G:G)),,1)),ISNUMBER(SEARCH(A3,Data!G:G))+0)
I cannot figure out how to manipulate this in order to find the count of rows with both values of 35 and E2. Any ideas?
Back story:
I have a system which is used for a service desk. This has tickets on it which have recorded data on them.
Worksheet 1 (Data):
I have exported this data into a spreadsheet to create trend charts on. The data collected is:
ID, Tag, Department, Month Created, Month Resolved, Week Created and Week Resolved.
I have then created another column which works out the difference in weeks (i.e. how many weeks it takes to resolve a ticket) and applied a filter to these columns.
Worksheet 2 (Count Data):
I have a table that counts the Amount of tickets created and resolved each week. Also I have another table that counts how many were resolved by how many weeks it took to be resolved, for example there are 235 tickets, that were created in week 35 and took less then 1 week to be resolved.
Worksheet 3 (Charts):
I have two charts that show the resolution/creation trends over the weeks and the counts of each week by how long the tickets took to resolve.
Problem:
Quite a simple spreadsheet however when I filter the Data's department to only show specific departments the charts remain unchanged. It turns out this is because the COUNTIF and COUNTIFS functions count regardless of filters. How do I get around the COUNTIFS issue?
=IF((SUMPRODUCT(SUBTOTAL(3,OFFSET(Data!H2,ROW(Data!H:H)-ROW(Data!H2),)),(Data!F:‌​F=35)*(Data!H:H=E3)))<=0,"Future",(SUMPRODUCT(SUBTOTAL(3,OFFSET(Data!H2,ROW(Data!‌​H:H)-ROW(Data!H2),)),(Data!F:F=35)*(Data!H:H=E3))))
This is how I solved the issue.

Using a Pivot Table to run Overtime Analysis

I am working on an overtime analysis report in which the data has been imported into Excel (2010). I need to show overtime and time off hours only. I've grouped all the time off hours by creating an additional column that only contains those hours (three different codes). Once the pivot tables are created, I'm creating line charts to show any correlation between time off and overtime in a department, month, and by person. It's working great for most of the employees, but . . .
The issue I'm having is that a segment of our employees have overtime built into their schedule, so the OT column values need to be reduced by that number. (YTD built-in hours is 42).
I've created a calculated field to give me the adjusted OT hours. The problem is when I create the chart, it includes all the fields - the time off data, the total overtime, and the adjusted overtime. If I filter out the overtime, the table doesn't do the calculations for the adjusted overtime. Is there a way to keep just the time off and adjusted overtime hours?
Calculations on detail records should not be done in a Pivot table. If - in your detail table - you create (or have) a field EmpClass that leads to another parameter table specifying the working hours per class, you can - via VLOOKUP and other functions - calculate the correct work/free/overtime for each record in the detail table and aggregate only these result fields.

Resources