Forecasting Year over Year Daily change in data in Excel - excel

I have data that looks as shown below
The blue line is for 2016 and the orange line is for 2017.
The X-Axis represents Days which are equivalent days between years. So for example day 20 might be 5/1/17 (for the 2017 year) and 5/2/16 (for the 2016 year).
The Y-Axis is the number of hours enrolled and each day it increases until around day 130 when the registration system closes.
I have historical data for 5 years but I want to make a forecast where the 2017 curve takes the same shape as the previous year's curve.
I have tried the Forecasting tool in Excel 2016 in two ways:
1. Forecast just on the 2017 data - not correct because it has no way to take the shape of historical data into account.
2. I lined up 2016 and 2017 in the same column then did the forecast but it was still completely wrong.
I tried also charting the curves and using linear, logistic, polynomial but none of thse approximate my actual curve.

Related

How can I design a conditional SUM, to get a calendar monthly sum across various date ranges in VBA or Excel?

I have a dataset that contains consumption of units across several date ranges.
The length of the range varies: sometimes it coincides with a calendar month, other times it's all over the shop, i.e. starts on a random day of the month and ends at a random day of either the same or the next, or even 2-3 months later.
My goal is to transform the data in such a way that I have the consumption broken down (and aggregated) across calendar months instead.
For instance if I had ranges between:
5 December 2020 and 14 February 2021,
15 February 2021 and 9 March 2021,
10 March and 30 April 2021,
it would be transformed to a dataset that would have the unit values corresponding with the full calendar months of January, February and March 2021.
For the purposes of this exercise, it can be assumed that consumption does not vary across days, i.e. each day corresponds with the same amount of consumption.
How could this be achieved with a VBA script?
I have explored the idea of using the worksheet function SUMIFS, but determining the date criteria (because it's a range, not a single date) seemed impossible.
I have also thought of looping through the data with several IF conditions and adding up what I need, but then I'd run the risk of not picking up certain data.

Excel - bar chart w series overlapp

Currently I have a grouped bar chart with a value on the y-axis (total guest nights in an area), and the months on the x-axis.
I have 2 series as of now: 2020 and 2019 - they are quite close to each other for each months so that you see that these relate to one another.
NOW I wanted to break each of these series into a more detailed aggregate.
The total guest nights each bar represent I now want the bar to aggregate the value for each market - whether domestic or abroad (so 2 components should now constitute the earlier total sum)
My idea doing this was (which I know work if I had just 1 year - e.g. 2019), is to put the e.g. abroad as the total amount and the domestic as domestic - then just use 100% series overlap.
BUT if I do this now - of course this happens to both my series related to e.g. 2019 but also for 2020 (which I do not want)..
I tried making use of the secondary y-axis for the 2020 series - but that didn't help at all - Excel still relate series overlap (on the x-axis) the same regardless of me making use of the 2nd-y-axis.
Do you understand my question?
I essence I want a stacked bar chart for 2 series (or in practicality 4).
Thanks!

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.

How to calculate a... median? of hour/day/month of occurence?

My problem concerns day of month however, I can see that the same logic would apply to month number or hour number or any other variable that ends on some value and then starts from 0 again.
It is defined as follows: I'm trying to calculate a day of month when a payment is made to use it for a forecast. So I have for example for one case:
1 May 2016
2 June 2016
30 June 2016
29 July 2016
6 September 2016
A simple average would give me 14th, and the median would give me 6th. But the result I'm looking for is more like the 1st.
I see I could do it somehow by calculating geometric median, or euclidean distances after placing the points on a circle etc, but I believe it can be approached in a much simpler way. I also see that solving this problem with standard means and averages would cause a situation where it gives more than one result.
But if we add an assumption that it should occur once in 30 days/a month? Wouldn't this assumption make the problem easier?
Please let me know if you solved a similar problem before or if you have any ideas
If the result you are "looking for is more like the 1st", then I would hazard a guess that you are really looking at a series of monthly payments (perhaps falling due on the first of each month or the first working day of each month) and you want some measure of the deviation between the due date and the actual date of payment.
If that is the case then simply calculate the difference in days between the due date and the actual date of payment for each monthly payment (following a consistent convention such as positive values denote late payment and negative values are early) and then apply your chosen measure (median, mean, etc) to the series of differences.

How to preform a regression on yearly mean?

If i have a set of data,how can i find the yearly mean in excel and how to perform a regression on the yearly mean in excel?
For example:
Date loss
2015 5
2016 3
2016 6
2014 7
2015 4
2015 5
2014 2
2014 1
You can perform a scatter plot and then take the line of best fit as one form of regression.
Select a point on the data series and right click. From the menu that comes up select add trend line. Over ont he right (depending on your veriosn of excel) you should have the option to display equation on chart.

Resources