How to build a line graph from two data sets in one table in Excel - excel

I'm having an issue with Excel to which I can't find an accurate solution online.
I have this table:
PERSON | DATE | SIZE
==========================
Matt | 1-10 | 90.1
Jane | 1-10 | 71.3
Matt | 1-11 | 90.0
Jane | 1-11 | 71.0
Matt | 1-12 | 89.6
Jane | 1-13 | 70.2
And so on...
The thing is that this is the best solution for inputting this kind of data. I can't have two different tables, one for each person involved, because more people will probably be involved later on, and they all should be included in the same table.
As you can see, the idea is to monitor their weights. And this would be better achieved visually by a line graph that can tell each person what their progress is.
To this end, I would like to set up one graph that shows each person's progress individually as a different line. Like this:
I was wondering if there was any way of having Excel automatically build this line graph using this table but ordering values according to if cell X has value....
Not being able to find that, I also tried to set up an invisible table that would gather each set in its own column. For that, I was thinking of using an IF statement but I can't seem to find a way of getting that to populate a separate table, row by row, with the data from the original table. On the Internet I can only find how to add up all the values in a certain cell if another certain cell has X value.
I was wondering if anyone out there could give me a hand with this. Thanks in advance!

I would use a pivot table and pivot chart to accomplish this.
Insert a pivot table, select your entire data range (including headers).
Select Person, Date, and Size in the field list.
Under pivot table options select pivot chart and choose your desired chart type.
Move Person to Legend Fields, Date to Axis Fields, and Size to Values.
Right click the pivot table and go to PivotTable Options
Under "For empty cells show: " write N/A (this will let Excel ignore missing dates)
Here is an example of the blank values.
Let me know if any further clarification is needed.

Related

Excel - Pivot table not counting missing days in average

I have a pivot table grouping by month and calculating the average of the values.
Before grouping, a row of the table would look like that:
|1May|2May|3May|4May|5May|
XX| 10 | | 10 | | 10 |
Note that, for the specific row, data are missing for 2May and 4May.
Once I group this selection, the average for XX will be 10.
My desired result would've been 6 instead, that is (10+0+10+0+10)/5.
Is there a way to do it, without installing software and without altering/adding columns to the input table?
The input data (which the pivot is based on) needs to have zeroes, not just blank cells

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.

Pivot table Calculated field - Sumif(s) between two dates?

I'm attempting to calculate periods of out of stock for a fleet of rental equipment that has been in service for the past few years. I'm having trouble creating a sumif calculated field that sums units by date if date is between start and finish. My data looks like this:
Calendar |Start |Finish |Product |Units
2015-12-06|2015-12-6|2015-12-6 |Snowshoes |2
2015-12-07|2015-12-6|2015-12-7 |Snowshoes |1
Calendar - is a helper column I've added. It's sequential dates from launch to the present
Start - is the start Date of a rental booking
Finish - end date of the rental booking
Product - What's being rented
Units - How many are rented for that booking
I'd like the pivot table to look like:
Date | Snowshoes | Tent ... etc
2015-12-06 | 3 |
2015-12-07 | 1 |
I'm having a hard time setting up calculated field that will sum units if date is between start and finish, I keep getting formula errors.
Here's the formula I'm attempting to use to create a calculated field:
= sumifs( Units ,Start,">= Calendar" , Finish,"<= Calendar")
Is this even the best way to go about solving this problem? Is my formula the issue or is the entire approach flawed?
Adding screenshots:
From the data you have in the screenshots, this is what I came up.
The formula to use in column G:
=SUMIFS($E$2:$E$29,$A$2:$A$29,"<="&F2,$B$2:$B$29,">="&$F2)
The formula to use in column H (BTW, this is just for your reference. You can use either one of them):
=SUMPRODUCT(--($A$2:$A$29<=F2),--($B$2:$B$29>=F2),$E$2:$E$29)
From here, I created a Pivot Table like this:
Hopefully this can help you. But definitely let me know if I miss anything from your question.

Add turnover column to my pivot table using PowerPoint

I am using powerpivot to create some metrics. On one pivot table, I want to show hires, terms and actives and then turnover % for each month.
I have the Hires, Terms & Actives powerpivot data working, however I do not know how I can add the turnover calculation.
Is there a way to insert a new column to a pivot table and run a simple division calculation in it?
*tried posting image of my data, not sure why site will not post image for me
one line of of table would look like such
Division | Hires | Actives | Terms | Turnover
Corporate | 5 | 150 | 3 | (terms/actives)
You can do this with the following measures:
SumActives:=
SUM(<fact table>[Actives])
SumTerms:=
SUM(<fact table>[Terms])
Turnover:=
[SumActives] / [SumTerms]
Adding a measure to a Power Pivot model.
Upon researching I found this thread on MrExcel that solved my question!
First create a measure
ValueSum:=SUM(Table1[Value])
then create a measures that takes the average of the monthly totals of the previous measure.
=AVERAGEX(VALUES(Table1[Month]),[ValueSum])

Historic data with missing dates in excel

Everyone,
I have an excell sheet which I have imported from my ERP program. It contains data about deviations in raw materials which were noted at specific dates.
There are 40 different materials and data was gathered throughout the last year.
The raw data looks like this:
Material name | Date | Deviation
Blue dye |2014.05.01| 50
Yellow dye |2014.07.02|-40
Blue dye |2014.07.04| 10
How can I transform this data to a stock-type chart which would should cumulitive deviations throughout the year (i.e. if Blue dye is always positive, how much had added up on each date).
I have figured out how to sum up the deviations with their previous values, I have also transformed the table so that all the materials have their deviations in a seperate row:
Material name1|Date1|Date2|Date3
|50 |-10 |20
Material name2|Date2|Date5|Date6
|5 |10 |-100
The problem is that the deviations don't happen on the same dates. If they were noted on the same day every week, this would be hard at all. In this case each material might not have a deviation for a month or two, while another has fluctuations every couple of days. I would need to somehow interpolate the data in between the dates, so that every day of the year is filled up.
I would appreciate any ideas, at this point I'm just stuck...
I thought the above may have been a little vague...i've done you a quick example at the link below - there are 3 tabs
1 for the raw data
2 to get the differences by date & material
3 to show stock holding each day by material (with no change should there be no change)
Assuming you wanted to graph this info by date/product you should have no problem doing this from the example.
hope this is of more help!
http://www.filedropper.com/materialexample
I would suggest using the original data but creating a table on a new tab, list the entire year in column A from A2 down then list the 40 materials across in B1,C1,D1...etc
Then Starting in first cell (B2) use SUMIF(AND functions to match the date in A2 and the material in B1. if there is a match then +/- the difference...perhaps start one cell lower down and use B1,C1 etc for the starting number to perform calculations...this should give you the holding at any one point.
Hope to have helped :)

Resources