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

Alteryx Designer Desktop Discussions

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

doing an Hours Conversion formula

COrr
7 - Meteor

So I'm sure there is an easy answer to this but I've been trying to rack my brain to figure it out.  I'm doing a basic hours formula by count.  However I would like to calculate this down to the day without effecting the previous months.  So example: if we are in Feb 15, 2019 how can we calculate that without effecting January's Hours Worked?  Is there formula that I can apply without having to update on a  regular basis?  I attached the workflow.

 

COrr_0-1579038686635.png

 

 

2 REPLIES 2
afv2688
16 - Nebula
16 - Nebula

Hello @COrr ,

 

I am not sure if I am getting right what you are looking for. If you are trying to do an acumulative calculation by month you could use the running total tool.

 

It lets you group the data by the selected fields.

 

Is this what you want? If not, could you please explain it with a quick example?

 

Regards

danilang
19 - Altair
19 - Altair

Hi @COrr 

 

If your looking for a cumulative total of the hours worked in a specific month for each day, you can calculate it using like this

 

w.png

 

Start by calculating the start date for the month and the number of days in that month.  Generate all the days for each month in your input.  Then calculate the hours worked to this date using the following formula

(DateTimeDiff([Date],[StartDate],"days")+1)/[DaysInMonth] * [Count]*[Hours Scheduled]

This calculates the percentage that the current date is of the number of days in that month and mulitples this percentage by the total work for the entire month.

 

The results look like this 

 

r.png

 

This assumes that someone works every day in the month.  If you need to include only business days the check the solution to this post for a way to do that.   

 

Dan

 

Labels