MichaelNapolita
6 years agoQrew Trainee
Remove dates from duration if they are contained within that duration
Hello
I am improving my monthly sales forecast chart - essentially it takes the gross sales from the beginning of the month up to today and divides by how many weekdays have passed so far (giving average sales per day) and then multiplies by the total number of sales days in the month giving the forecasted monthly sales.
I would like to also exclude holidays without having to manually edit them monthly. I would also like it to know on which day the holiday is (for example this month July 4th has already past so I'd like it removed when calculating the average sales per day).
I have created app wide "variables" for each holiday but I am having difficulty removing them from my range (since its not a fixed range), these variables haven't been used in the formula below.
This is what the formula currently looks like (the -1 is to adjust for the 1 holiday this month, but I'd like this to be referenced through variables instead):
([Total Sales Order Revenue]/[Weekdays Month To Date])*([Total Weekdays Current Month]-1)
Here are my fields:
[Weekdays Month To Date]
WeekdaySub((Today()+ Days(1)),(LastDayOfMonth(AdjustMonth(Today(),-1))))
[Total Weekdays Current Month]
WeekdaySub((AdjustMonth(FirstDayOfMonth(Today()),+1)),(AdjustMonth(LastDayOfMonth(Today()),-1)))
Thank you in advance for any help / advice and let me know if I am not explaining clearly. thanks!!
I am improving my monthly sales forecast chart - essentially it takes the gross sales from the beginning of the month up to today and divides by how many weekdays have passed so far (giving average sales per day) and then multiplies by the total number of sales days in the month giving the forecasted monthly sales.
I would like to also exclude holidays without having to manually edit them monthly. I would also like it to know on which day the holiday is (for example this month July 4th has already past so I'd like it removed when calculating the average sales per day).
I have created app wide "variables" for each holiday but I am having difficulty removing them from my range (since its not a fixed range), these variables haven't been used in the formula below.
This is what the formula currently looks like (the -1 is to adjust for the 1 holiday this month, but I'd like this to be referenced through variables instead):
([Total Sales Order Revenue]/[Weekdays Month To Date])*([Total Weekdays Current Month]-1)
Here are my fields:
[Weekdays Month To Date]
WeekdaySub((Today()+ Days(1)),(LastDayOfMonth(AdjustMonth(Today(),-1))))
[Total Weekdays Current Month]
WeekdaySub((AdjustMonth(FirstDayOfMonth(Today()),+1)),(AdjustMonth(LastDayOfMonth(Today()),-1)))
Thank you in advance for any help / advice and let me know if I am not explaining clearly. thanks!!