I am trying to plot some time series data, but in a way that has stumped me so far. The salient part here is that each data point is associated with an open date and a closed date. I would like a time series line graph that counts the number open on a given date.
Example: Open - Close
first record: 2/10/2013 - 3/1/2013
second record: 2/15/2013 - 3/5/2013
The graph I'm looking for would start at 0, rise to 1 on 2/10 rise again to 2 on 2/15 then drop down 1 on 3/1 and back to 0 on 3/5.
The actual dataset contains hundreds of records, so manual processing is out of the question. I'm sure there must be an easy way to do it, but I have not found it yet. Tried help and google search, but I'm not exactly sure what I'm looking for.
Use the CountIfs() function like so:
So, you specify the category labels, and then use the COUNTIFS() function to evaluate, for each category label, how many records are open at that time.
You can use the result of the Countifs function as the frequency for a histogram, time series, bar chart, etc.
Then, plot the data in columns E & F (or however your sheet happens to be arranged) to create the chart.
Edit
To include blank values in the count, modify the formula thusly:
=COUNTIFS($B$3:$B$7,"<="&E3,$C$3:$C$7,">="&E3)+COUNTIFS($B$3:$B$7,"<="&E3,$C$3:$C$7,"")
Related
Let's say we have time slots documented in which a production line was running. In between each product maufactured are time slots in which the machine was idling.
I now want to plot the machine status over time, basically as a boolean value (running vs idling).
I get the machine log and need the chart on the right.
The machining duration will ultimately be logged including seconds and may vary for each product.
The first - and probably biggest - challenge for me is to find a smart way to extract the status from the time stamps. My current first step ist to create a table row for each minute and use the if statement in H4 to check wether article 1 was being manufactured.
IF(AND([#Time]>Machine_log[#Start],[#Time]<Machine_log[#Finish]);;)
However, since the final list will range over 24 hours or more and the number of articles quickly reaches 50 and more, I would love to avoid using nested IFs on this one..
I'm thankfull for any input and open for inspiration :)
Thank you all in advance!
PS: Anyone know how a better way than a scatter chart with two values per X-Value to display the chart as vertical lines/right angles like this?
One option is to add only those points that are necessary to the Status extraction table (which I named "Status"). (I named the Machine log table "Log").
Note: it looks like you are using a semicolon list separator, so you'll need to change the commas in the formulas below to semicolons.
Formula for the Time column:
=IF(ROW()=ROW(Status),MIN(Log[Start])-1/144,IFERROR(INDEX(Log[[Start]:[Finish]],INT((ROW()-ROW(Status)-1)/4)+1,MOD(INT((ROW()-ROW(Status)-1)/2),2)+1),MAX(Log[Finish])+1/144))
Formula for the Production running? column (enter into H4 and fill down):
=IF(SUMPRODUCT(--(Log[[Start]:[Finish]]=[#Time])),IF([#Time]=G3,3-H3,H3),1)
These formulas will pad your plot with 10 minutes of off time on either side.
To answer your question about avoiding two points for each x-value: no, each point on the plot has to have a corresponding data pair.
UPDATE IN RESPONSE TO COMMENT: I failed to mention that the above solution assumes the time data in the Machine log table are in ascending order. This means that if your data span more than one day, they will need to contain a date component or you can get plots where the line crosses back to the beginning. For example, if you have 23:57:00 followed by 00:10:00 with no date component, Excel treats these as 11:57 pm on 1 January 1900 and 12:10 am on 1 January 1900. (To see this, change the format to "General", and you'll see the values that Excel uses to encode date-time aren't in ascending order.) The solution is to enter the dates as "8/16/2020 23:57:00" and "8/17/2020 00:10:00" in the formula bar. If you're copying over from another data source, the date needs to be copied with the time. If the dates and times are in separate columns, your Start and Finish columns would each be a date column plus a time column.
Im trying to do an excel chart where the data will vary depending on the results, I'm been reading many articules online for this topic, however, I didnt manage to accomplish it on my data so far.
Here is my problem:
I have 3 lines which I need to update each one based on daily results (game results): so far, there are some games concluded and other that didnt even start yet, therefore, I only want to include on my graph, those games which already happened:
Therefore, I have one cell on sheet that gives the line of the last game available L34, so, I just want include the first game until the last one:
My last game updated is on line 37 and my formulas to y axis text and data are:
I have a formula ="COMPARAÇÃO!"&S39&":"&T39 on cell V39 which means COMPARAÇÃO!E7:F37 for the y axis text and the formula ="COMPARAÇÃO!"&S40&":"&T40 on cell V40 which means COMPARAÇÃO!G7:G37 for the data
I created two cells name (tag): one for the y axis text_range where I used the formula =INDIRECT(COMPA!$V$39)and another one for the line data data_range with the following data =INDIRECT(COMPA!$V$40)
So finally I tried to change the graph series data as following (BOLAO is the name of the excel file and COMPA is the excel sheet with all the data):
However, I get the following error: (It was found a problem with one or more references of formula in the file)
I dont know what can be wrong with my file
try doing =COUNTA(data_range) and =COUNTA(text_range) in a cell and see if those formulas return the expected value or the error you showed above. – John F Jun 25 at 2:40
I made a little test machine that accidentally created a 'big' data set:
6 columns with +/- 550.000 rows.
The end result I am looking for is a graph with 6 lines, horizontal axis 1 - 550.000 measurements and vertically the values in the rows. (capped at 200 or so). Data is a resistance measurement that should be between 0 - 30 or very big (borken), the software writes 'inf' in these cases.
My skill is limited to excel, so what have I done until now:
Imported in Excel. The measurements are valuable between 0 - 30 and inf is not good for a graph, so I did: if(cell>200){200}else{keep cell value}.
Now making a graph is a timely exercise and excel does not like this, result is not good.
So I would like to take the average value of 60 measurements to reduce the rows to below 10.000. So =AVERAGE(H1:H60)
But I cannot get this to work.
Questions:
How do I reduce this data set and get a good graph.
Should I switch
to other software that is more applicable?
FYI: I already changed the software of the testing device to take the average value of a bunch of measurements the next time... But I cannot repeat this test.
Download link of data set comma separated file 17MB
I think you are on the right track, however my guess is that you only want to get an average every 60 rows and are unsure how to do this.
Using MOD(Number, Divisor) inside an if statement will let you specify that the average should be calculated only once in every x number of cells.
Assuming you'll have one row above your data table for headers, you are looking for something along the lines of:
=IF(MOD(ROW(A61),60) = 1,AVERAGE(H2:H61),"")
Once you have this you can filter your average column to non-blank values and use this to create your graph.
I've done some Googling for each of my issues but haven't found exactly the results as I wanted. Things I need to be done doesn’t probably include any macros/VBA skills, just basic knowledge of Excel.
Now to my spreadsheet. I'm a Dota 2 player and I like statistics. I like it that much that I'd like to keep track of my achievements and results. Only problem is that the game tracker sucks and to get great information in web you have to pay for it, so I decided it's time for me to create my own spreadsheet to track my skills.
I don't know which place is the best to share my spreadsheet but I uploaded it to Estonian uploading host, link is here. I will also provide with pictures so you don't have to download anything.
This is what it looks like in general:
Problem number 1: The left table, or column has 1000 rows. In web design it's possible to make elements fixed depending on the scroll, I'd like to use similar feature here. If the table gets scrolled down, the right table (area with games, bonus and graph) will get scrolled down with it.
Problem number 2: Average MMR. I'd like to show average MMR after each entry depending on the first entries. Right now there's avg MMR for J4:J8. The calculation for J8 looks like this: =AVERAGE(C4:C8). For J7 it looks like this: =AVERAGE(C4:C7). I'd like to do this for all my 1000 rows, but I don't want to type it out. If I try to drag down from the corner, it will continue with C5:C8, C6:C9 etc (so it changes the starting point)
Problem number 3: Under longestGame there's currently Date and Hero. This should show the Date and Hero of which the longest game occurred. I tried to do this with LOOKUP function but it required table to be in ascending order, which I don't want. For current, 44,22, there should be Storm Spirit and 14.06.2015.
Problem number 4: Graph. I'd like to display three series on graph - MMR, average MMR and game length (time). The problem is, that MMR and average MMR will be in the numbers on 3000-7000 but the game length will only be probably in timeframe 20:00-120:00. Maybe it's possible to add two sets of values to the Y axis or maybe set Time series maximum 200:00 and minimum 0:00 and create graph according to this. I'm really stupid making graphs and I haven't figured out a clever way yet.
Problem number 5: Graph again. Right now I have to set the series for the graph. I've currently set it to C4:C54 (so 50 rows). I'd like it to move around a bit and by that I mean that if there happens to be C55-th game then the graph would start from C5:C55 and move along (so it'll count 50 last games).
I'm in a benevolent mood so rather than downvoting your question, because it is not really suitable for this forum I'm going to give you some hints and guidance. The numbers below correspond to the problems in your question.
Excel permits more than one window to be used on the same workbook -
so one window can show the data and one the summary.
Find out about absolute and relative cell addressing - its a valuable bit of knowledge for anyone serious about Excel and it will be of use in solving your problem.
Find out about the MATCH function. You can use this to find out which row of your table contains the longest game, shortest game, max MMR, min MMR by matching an element from the summary on the right (cols M onward) against the appropriate column table on the left. The find out about the INDEX function - this can be used to pull the values in the columns for Hero and Date which correspond to a specific row (such as the row containing the longest game, shortest game, etc). Search INDEX MATCH and find out why using these two functions in combination is often preferred to using the VLOOKUP function
Persevere - there are graph options available to do what you want and the only way to really learn is to go through the pain of trying them out, failing and working at it until you succeed.
Set up an area of worksheet to hold the 50*3 table of data for your graphs. Find out about the COUNT function and think how it might be of use in determining which rows of the data table map to the 50 rows of graph data. Then think about how to populate the graph data table using one of the functions mentioned above. Incidentally, C4:C54 is actually 51 rows, not 50.
I've got a spreadsheet with a few thousand tweets in it, each one is time-stamped like so:
18/05/2014 21:14
Amongst other functions I've sorted out, I'd like to plot all the tweets on a graph grouped together by say 15-minute segments.
How can I group those different times(tweets) together?
I found a solution to this on another forum:
http://www.mrexcel.com/forum/excel-questions/359025-pivot-table-grouping-5-min-intervals.html
See the final answer.
It suggests adding a column to your raw data that contains a formula to round each time down to the previous increment.
For you, the formula would be as follows, where A1 contains the time stamp.
=TIME(HOUR(A1),FLOOR(MINUTE(A1),15),0)
In your example, 21:14 would become 21:00. 21:16, meanwhile, would become 21:15.
If you format your data as a table, the formula will auto-fill for all of the tweets.
Then, you can use a pivot chart based on the new column to create your graph. Since everything will be rounded down, the label 21:00 would include all tweets posted from 21:00 to 21:15.