Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Estimating Days for the remainder of the month

sshutchinson
7 - Meteor

Hello,

I have a question about estimating data in Alteryx. In this example, I have a data set with the date range Dec. 1-28th. Because there are 31 days in Dec., I need to estimate the rest of the data for the 29th, 30th, and 31st. To do so, I want to use a 7 day lookback. By that I mean, the 29th will use data from the 22nd. The 30th will use the data from the 23rd. The 31st will use data from the 24th. 

If this were to happen in a different month, no matter how many days I have left to estimate, the 7 day look back formula will be used. 

I then want this to be added to the raw data set that I originally started with and create a template with the following tabs. "Raw Data Dec 1-28th" will be the original data set. "Estimated days" will only include the days that are being estimated. "Dec 1 - 31st" will include both the raw data and the estimated days. "Output" will be a summary of the Total column based on the Date and whether it was Y or N. 

3 REPLIES 3
Luke_C
17 - Castor
17 - Castor

What's the question?

 

The below formula will tell you how many days are left in the current month:

Datetimediff(datetimetrim(datetimenow(),'lastofmonth'),datetimenow(),'days')

 

sshutchinson
7 - Meteor

See above. Thanks for your help!

apathetichell
19 - Altair

@sshutchinson 

the formula @Luke_C provided will give you the number of days until the last day of the month.

 

Datetimeadd(datetimetrim(datetimenow(),'lastofmonth'),-7,'days') would give you 7 days from the last day of this month. datetimenow() can be replaced with a date field using the standard [fieldname] notation if you want this to be relative to a field.

 

Labels
Top Solution Authors