We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Generating Rows for Employees with 0 Hours

jmathew94
7 - Meteor

I need to calculate weekend hours for all employees however only a handful of employees will have hours logged on the weekend. The remaining employees will have their usual 5 days logged (or less depending on vacation/sick etc). I need to generate rows to bring in Saturday and Sunday dates for ALL employees on the list so we can count who has weekend hours and who has 0. I attached an example with the highlighted row is what I am trying to accomplish. 

6 REPLIES 6
jmathew94
7 - Meteor

Rows.JPG

MilindG
12 - Quasar
jmathew94
7 - Meteor

Thanks however that is not the issue. I can use the dates to determine what is a weekend and what is not. The issue is that some employees only have 5 rows of data for the week but I need all of them to include the two weekend dates. There needs to be a line item for each saturday and sunday for every employee because a lot of them only have 5 rows of data (5 working days).

jmathew94
7 - Meteor

@DataNath @binuacs Any help you can provide? Thank you!

apathetichell
20 - Arcturus

brute force way.

summarize tool all dates in your range.

summarize tool all employees.

append. (making sure to accept over 16 entries.)

join your original data to your append by employee date.

rows where hours are null() did not exist in your oririnal datastream.

use a formula tool to identify them and make them as 0.

 

binuacs
21 - Polaris

@jmathew94 I assume you want the weekends of the current month, the row generate tool generates all the weekends of the current month and appends to the original data

image.png

Labels
Top Solution Authors