Pivot chart for totals of key value - excel

I have a large collection of data which is formatted similar to the representation below:
Machine1 Name1 Product1 Quantity1 Scrap1 delaytype1 delaytype1time delaytype2 delaytype2time
Machine1 Name2 Product2 Quantity2 Scrap2
Machine2 Name3 Product3 Quantity3 Scrap3 delaytype3 delaytype3time
Machine3 Name4 Product4 Quantity4 Scrap4 delaytype1 delaytype1time delaytype2 delaytype2 time
Now, I have all of the data in Excel sheets, and its quite vast (several thousand sheets, dozens thousand rows combined), and I use pivot charts to graph some of the data. I want to make some charts, lets say how many pieces did each machine produce and so on, and important thing to graph nicely are the dealys. Lets say the machine1, on specific date, had three delays. There are 10 delay codes, ( code 1 is machine broken for example), so the entry would be 1 1 (first 1 means the code, second time in hours). Several delays can happen for one machine for a row, or none. So that field has flexibile length. Each code and its time are in separate cells, like in the sample data I wrote above, each text represents a cell.
Is there a way to make the pivot chart graph this but sum up the individual delays of the same type together? For example, if Machine1 had two rows, and on first had the following delays 1 1 (broken machine, 1 hour), 2 2 (no power, 2 hours), and on the second day, 2 2 (no power, 2 hours), 3 1 (no worker, 1 hour), the result would be 1 1, 2 4 (two hours from day 1, two from day 2), 3 1.
Thanks

At the end, I resolved the issue by porting the data to specifically organized tables and generated the PivotCharts from there.

Related

Excel - Count the number of instances of order status

I have the above sales order data which lists a day by day update of orders as they go through each stage until shipped. Orders 1 and 2 are shown alongside the status of that order for each date between 1st and 08th February.
What I need to do (in a pivot eventually), is to count the number of days for each order that they were in each state. So for example Sales number 1 was in a processing state for 4 days and a packed state for 3 days and then finally a shipped state for 1 day. I want these 3 numbers displayed beside each status maybe on a separate line?
For example
Sales Number 1
Processing - 4 Days
Packed - 3 Days
Shipped - 1 Day
You'll also notice that on Sales Number 2, the order went back into a "On Hold" state, this can occur in my dataset so just count it as normal e.g On Hold - 2 days.
How would I get this count using a formula or pivot etc?
Simplest way is to use pivot table:

alternating row colours in Cognos 11 based on group

I have a simple list with 18 columns and several hundred rows of maintenance job data.
In Excel I can highlight potential duplicates by concatenating 5 of the columns (specifically excluding the job number) and comparing the results. If I sort by this concatenated column then the potential duplicate jobs sit one after another.
I can then add a calculation which is essentially 'if this cell equals the cell above then keep the count the same; if it is different then increment the count'. This results in the following:
Concat
Count
Job No.
Room No.
Location
Problem
101BathroomToilet Leaking
1
69780814
101
Bathroom
Toilet Leaking
101BathroomToilet Leaking
1
76041238
101
Bathroom
Toilet Leaking
105BedroomCurtain Rail Missing
2
71493529
105
Bedroom
Curtain Rail Missing
105BedroomCurtain Rail Missing
2
72043090
105
Bedroom
Curtain Rail Missing
Finally; I can use the resulting 'Count' column to alternate the background colour for each set of potential duplicate jobs (using ISEVEN() & ISODD()).
I'm trying to recreate the report in Cognos and I have got stuck on the count column.
I can get a running-count of ALL of the rows (e.g. 1,2,3,4 for the above example) and, by using grouping, I can get a count of the number of each duplicate concat (e.g. 1,2,1,2 for the above example) but I cannot for the life of me work out how to get the count to run like the table above.
Any ideas?
Thanks in advance,
Alan
I managed to answer my own question in the end through copious amounts of trial and error.
If anyone is having the same problem then all you have to do is to wrap the initial count() into a running-count(). For example:
running-count( count([Concat] for [Room No.], [Location], [Problem Type]))
This will produce the count as per my original question.
Alan

Waterfalls in Excel

UPDATE I tried to upload pictures, but I got the message that I couldn't upload pictures but I got links instead. Let me know if this works...
Thanks for taking a second to look through this. This is my first post so I am trying to make sure that I make the question (and hopefully, the solution) relevant to more than just me.
I work in a repair/manufacturing planning position and have to identify the bottlenecks in my various processes. I have one type of asset that has multiple flavors. For example, if I worked on Honda Accords, I would have to distinguish between a 1986 Accord LX from a 1996 Accord EX-L.
Based on the induction schedule of my assets and how long they take in different parts of my processes, these bottlenecks can be manifest in several different ways: a lack of facility space, a lack of a certain type of manpower, or a lack of support equipment just to name a few. Now, I have dates for incoming assets for the next two years, and I have the durations for the different parts of my processes that each type of asset will. More simply: an Accord from 1986 takes 3 weeks to inspect (Gate 1), 4 weeks to repair (Gate 2) and 5 weeks to put back together and test (Gate 3); whereas an Accord from 1996 takes 3 weeks to inspect(Gate 1) 2 weeks to repair (Gate 2) and 3 weeks to put back together and test (Gate 3).
I have already been able to take the incoming dates an lay them out on our fiscal year (vs. the calendar year) using =weeknum(). I then used an =IF() to place an "x" on the corresponding week.
What I am looking to do is place a series of colored cells (corresponding to the weeks of the gates) that starts in the cell with the "x" and extends to the cells to the right the number of cells corresponding to the number of weeks. For example, if I have a 1986 Accord start in week 3, I would like the 3 cells to the right to be blue, followed by 4 green cells, and finally 5 yellow cells. I am essentially trying to graphically represent the times that the assets will be within my facilities and where my bottlenecks are. If I only have 5 locations for Gate 1 and my waterfall shows I have times where I need 8 spaces, I need to let the boss know.
I didn't see a way to upload the files I am working from, so if someone will let me know, I'll post up what I have so far...
Again, thank you for looking.
The data as I initially receive it and format it: Initial Information
The finished waterfall product I am looking to make: Final Waterfall

Sort one data set to get the best fit with another data set

I'm currently working on an Excel program to manage employees at the checkout counters at a larger supermarket. It will load the employees' work schedules from an online database and then place the employees at the different counters.
Currently I'm at a point where I have loaded the schedules and divided the employees into the day shift and the evening shift in a sheet looking like this (only with much more people in reality):
A B C D E F
1 Name1 0745 1615 Name5 1515 2130
2 Name2 0830 1600 Name6 1600 2230
3 Name3 0915 1615 Name7 1630 2230
4 Name4 1000 1530
where 0745 is 7:45 and 1615 is 16:15 (4:15 PM)
Now, I would like to match a person from the day shift with a person from the evening shift so that ideally there will be a 15 minute overlap between all of them. As in the example above it is not necessarily given that there are equally as many people in the day and the evening shift, neither it will not necessarily be given that there can be an overlap of exactly 15 minutes between all teams of two. In this case, an overlap of 30 minutes is better than an overlap of 0 minutes for instance.
My own idea is to try all possible combinations of matches between the two data sets and then assign different error values to the different kinds of overlaps so for instance an overlap of 15 minutes yields a value of 0, 30 minutes yields 1, and 0 minutes yields 2, and then the best match is the one with the smallest total error.
However, I have no idea how to program this in VBA or if this is even the best approach.
I have tried searching the forum, but I didn't find anything helpful unfortunately. I hope one of you can help me or have an idea where I can search.
I think there's a lot of thinking behind the answer to your question. Writing the code for this is a bit of a project, in my opinion.
You could make your life a little easier by sorting columns A-C ascending by column C and sorting columns D-F ascending by column D. If you're not working with a lot of employees, your answers will kind of fall out of that. (In your sample data set, it becomes immediately clear that Name4 is paired with Name5 and Name1 or Name3 is paired with Name6.)
It's not a complete answer, but maybe it's a start.

Control which rows a data table will calculate

I have a 2-way data table in Excel (as in the option under "What-If Analysis"). There are 50 rows when analysing a 50 year deal, but only 4 rows when analysing a 4 year deal.
I only want to use one data table (of 50 rows) but I don't want it to calculate all of the values if it doesn't have to. e.g. if I have a five year deal I want the values in the first 5 rows to be calculated, but for the rest I would like it to display 0 or a blank.
Is there a way to do this without VBA?
(I was thinking with VBA I could create a whole new data table every time I run it, but would prefer not to as I am still developing structures.)
I'm guessing that either your row labels will step consistently. Just blank out the years that are not required, when not required (rows 6 and upwards in your example for 5 years), and repopulate with series fill to suit.

Resources