Creating excel graph with 2 variables - excel

I am trying to create a graph in excel (thinking about a scatter graph) with two variables. I have day of the week and and time of day. I would like Day of the Week to be on the Y axis and Time of Day on the x-axis. How can I achieve this?

You need to format the day values as dddd as mentioned in the comment. Here's an example. I have chosen the numbers in the Day column so that if represented as a date they start from Monday.
I also fixed the min and max of the y-axis to 2 and 8, and the min and max of the x-axis to .125 and .75 (because each hour=1/24 of a day so to get an exact number it's easier to work in multiples of 3 hours or 1/8 of a day).

Related

MS Excel - showing restricted time values in y axis

To compute the travel time (across two points) over a period of time, I was logging the time at which I crossed the sub-points between the two main points. My ultimate aim was to prepare a line chart which would show the trend of the journeys, and then find out where I have lost time and where I have gained.
My time entries are in the below format
Day 1|Day 2
09:55|09:35
10:01|09:37
10:06|09:42
10:09|09:45
10:12|09:49
10:15|09:51
10:22|09:58
10:28|10:08
10:35|10:18
10:38|10:21
10:48|10:31
I drew the chart with the time series appearing on the y axis (with journey points on the x axis). But Excel has some logic to determine which time values should be shown in the y axis. How can I force excel to only show the time values which I want to be seen? For example in the above case I actually need time stamps like ;
09:00
09:15
09:30
09:45
10:00
10:15
10:30
10:45
11:00
How can this be done? Thanks in advance.
Found the answer. On the Axis there is a provision to set the Min, Max values, and Major and Minor points on the axis.
For the Min and Max values, divide the hours you wish to see by 24. Example, if the starting time should be 9AM, then 9/24 = 0.375 should be given as the Min value. If 12 noon should be the max value then 12/24 = 0.500 should be given as the Max value. For the Major point, in case the intervals have to be of 15 mins the formula to be used is (15/60)/24 = 0.01041.

Re-arrange Axis of MS Excel 2016 Scatterplot

Software: MS Excel 2016
Files: GitHub Repository
Referring Question: MS Excel Scatterplot converts Months to Numbers
I created scatterplot in month_unordered_axis.xlsx from following data
Then I customized X-axis so it displays only month
Unfortunately the scatterplot (in Chart1 of month_unordered_axis.xlsx) starts with October rather than January.
How to order the X-axis so it displays from January to December?
Your graph is displaying October as the minimum value from its automatic formatting of max/min values. i believe if you scroll up in that formatting window on the right while you have the X-axis selected you will see an option for min and max value. You could set this for the minimum value you in your graph to 36892. This corresponds to the integer value for you lowest date in your series. The unfortunate side effect is that half your circle will be cut off as it extends into the range that is less than your minimum value. You can also set your maximum date to 37256. There are a few other end numbers you can use to give the same results but its essentially the end of December start of January the following year that allow December to be displayed.
Now if you want every month to be displayed (which is independent of placing max min values on your graph), look for the UNITS and Major box. Since you will want ever major line displayed with the name of a month, you will need to make sure the next grid line is a month away. Since not all month are not equal in length you need to play with this number a bit to suit your needs. I started with 30 and wound up with 2 Januaries back to back. However bump it up to 31 and then it tips over into the next month.
The important thing to note here is that you are not actually graphing by months along the X-axis. You are actually plotting by the number of days since January 1st 1900. so January 1st 2001 is 36892 days since January 1st 1900. What excel is doing is counting those days, determine what the date is in a way we like to read it and displaying only the portion we want it to. So for mmmm it the full spelling of the month. And you can see why each grid line being 31 days away is needed to jump into the next month. The kicker is, the grid line is not necessarily the 1st of each month due to the over stepping that is done when you advance 31 days in a month that has 28, 29, or 30 days. and that error gets compounded through the year.
Try using 32 as theMajor Unit step first before putting min and max caps on. (31 resulted in Feb being skipped on my screen). You should still see your axis start before Jan, but your months should all be in order, all displayed and no circles being cut off. Adding the max and min to the axis will cut off your circles but limit the axis to only displaying 12 months.

SpotFire: Sum over region average over time while toggling the date axis (from month to year)

Consider following data with following columns Region, Demand (is in ton per day basis) and Date.
Now when i open a Bar Chart with Date on x-axis (Year>>Quarter>>Month>>Day) and Sum(Demand) on Y-axis.
This is correct only on Day level, when i toggle to month, quarter and year, i want it to sum over region for a particular date then average over month/quarter/year where ever the toggle is set.
Any help is much appreciated.
I encountered the same challenge and just found a solution today :)
You need to insert "Hierarchy" for the date on x-axis and use the "Hierarchy" as x-axis.
My example:

How calculate average time in Excel (if sum of hours more, than 24)

I have some time values like 10:00, 8:50, 9:45 and so on (24 hours format).
I want to know how I can compute average value of this 3 items, if sum of hours more than 24 (if less, then no problems)?
Thanks.
Thanks for everyone. It works, if just type values in cells and try to find average, but it work weird if I use time, which already result of my calculation already. Here screenshot:
Calculating the average of a set of times or list of wind directions could be regarded as similar to computing the average of a set of vectors (values containing both direction and magnitude). It is therefore necessary to equate the time values to their respective positions on a unity circle, derive their perpendicular component values and sum these as is the case for taking the "average" of any such form of cyclic group.
Say you have two times, 23:00 and 01:00, then a normal average calculation (sumproduct/count) will leave you with the incorrect value of 12:00 [(23+1)/2] instead of the correct 24:00 / 00:00 value. If you however regard 23:00 as equal to the vector 1<345° on a twenty-four hour circle and 01:00 equal to 1<15° you can obtain their vector average [cos(345°)+cos(15°) + i*(sin(345°)+sin(15°))] = 1<360° a value equating back to 00:00 on the 24 hour circle.
Note however that this method will cancel out times exactly 12 hours apart, e.g. if you only have 01:00 and 13:00 it is not possible to determine an average time.
I'll just leave you with the formulas then (times in A column)
TIME_TO_DEGREES COSINE SINE
=(360/24)*(HOUR(A2)+MINUTE(A2)/60) =COS(RADIANS(B2)) =SIN(RADIANS(B2))
=(360/24)*(HOUR(A3)+MINUTE(A3)/60) =COS(RADIANS(B3)) =SIN(RADIANS(B3))
=(360/24)*(HOUR(A4)+MINUTE(A4)/60) =COS(RADIANS(B4)) =SIN(RADIANS(B4))
=(360/24)*(HOUR(A5)+MINUTE(A5)/60) =COS(RADIANS(B5)) =SIN(RADIANS(B5))
[C8] [D8]
COMPONENT AVERAGES =AVERAGE(C2:C7) =AVERAGE(D2:D7)
AVERAGE DEGREES DEGREES_TO_HOUR MAGNITUDE
=ROUND(DEGREES(IF(C8=0,ACOS(C8),
IF(D8=0,ASIN(D8),
ATAN(D8/C8)))),3)
+IF(C8<0,180,0)
+IF(AND(D8<0,C8=0),180,0)
+IF(AND(D8<0,C8>0),360,0) =E8/360 =(C8^2+D8^2)^0.5
In the case that the magnitude is zero it is an unfeasible operation to try and compute an average time.
As you would any other numeric values (e.g. using the AVERAGE() function).
Use a formatting mask of:
[hh]:mm
if you want to display more than 24 hours (e.g. for the SUM() function).
Have you tried using the AVERAGE function?
I tested it in excel with your values and it gives me the correct average time.
One method is converting every cell time into seconds , then average these seconds and at last convert to hh:mm:ss format
Simple Just click on Cell(Time) and Converted(Automatic) into 12 hr time
i.e. if you have 00:31:24 then convert it into Full date like this 12:31:24 AM.
After that you can use Average.

How to get an Excel graph show "up to" current day of week

In Mac Excel 2011 I have a Scrum burndown chart that tracks the number of points ‘burnt’ per day (starting from say 100, hopefully burning down to 0).
The number of points per day is made up of a sum of X number of columns (tasks).
I then have a marked line graph which takes it’s Y value data from the summed points per day.
My issue is that the marked line graph will always display 5 work days worth of burn, even though we might be on Tuesday.
I need a solution that means I don’t have to manually update the graph y value each day (adding it), instead the graph knows it is Wednesday, and selects data up to Wednesday.
Do you want to show the days for the whole week? (probably, since a 1 or 2 day chart early in the week will look funny.) Are the Y values linked from another cell?
If so, change your links from
=A1
to
=IF(LEN(A1)=0,NA(),A1)
NA() produces #N/A in the cell, which isn't plotted.

Resources