Alteryx Designer Desktop Discussions

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

Generate Rows to Find the Missing Hours

DataPirate26
10 - Fireball

Hi All, 

 

I have one dataset which has List of all Employees Who clocks Hours Each day. I have to Find out the Employees whose Combined Hours Clocking for the day is Less than 8 or That person has not clocked any hours and has missed to fill the timesheet completely. 

 

There can be 3 scenarios

 

1. So for employees who will have Date field and Hours Field as blanks that means they have not clocked any hours for the Month. 

2. Employees might have filled first few days of the month and Forgot to Fill the rest of the days. 

 

Example: Employee has Filled for 1st and 2nd Sept and has missed to fill the rest of the dates. We would need to Find out those dates for which he has forgotten to Fill the timesheet or if he has filled but the cumulative sum of the hours for the day is less than 8. 

 

3. IF Employee have started filling filling from a given date say 4th Sept we will consider that as the first day would not have to look for 1st,2nd ,and 3rd Sept as That person maybe was in leave. 

 

 

 

Note: Only Workings days are to be considered and weekends needs to be excluded. Filter out all the names who has clocked Less than 8 hours or has forgot to fill the timesheet. For Employees who has missed out "0" shall reflect in the hours Field. Filter should be as such that the date range can be changed dynamically. 

 

Below Attached is a Sample Data

 

19 REPLIES 19
DataPirate26
10 - Fireball

@OllieClarke Yes I want to change the date range from the App itself. As per the need It will be changed and for that range we will need to figure out the Missing Dates for which user has employees have not clocked any hours. So it will always change dynamically based on user's selection

OllieClarke
15 - Aurora
15 - Aurora

Okay @DataPirate26 

 

I've added 2 date interface tools, one called StartDate, and one called EndDate

 

By connecting these tools to the Q anchor of the relevant tools, then we can replace the user constants with the values from these tools

 

Is that what you're after?

OllieClarke_0-1664283004124.png

 

DataPirate26
10 - Fireball

@OllieClarke Yes.But why are you not using the Action Tool to update the values ? Will this work dynamically when I will change the date range. 

DataPirate26
10 - Fireball

@OllieClarke My ask is that For a particular date range I want to check which are the Employees who have clocked less than 8 hours for a particular day and the employees who has missed to fill the timesheet Completely. The output is completely Fine what you have shared. 

 

The User wants to select the date range as per their need. So the Start date and the End Date will change every time dynamically. It can have more than 2 3 months data. For that particular date range I have to find out the Employee names who has missed Out and which particular dates. The Solution above seems to be fine but little confused with the app part. Will it change dynamically everytime as we ar not configuring the action tool 

OllieClarke
15 - Aurora
15 - Aurora

@DataPirate26 

You don't need the action tool, although you could do the same thing with it. I'm referencing the values coming out of the interface tools directly. If you test it by trying different dates, then you'll notice that it does work

OllieClarke_0-1664285560242.png

You can read more about using the Q anchor over Action tools here: https://community.alteryx.com/t5/Alteryx-Designer-Discussions/Difference-between-Input-Connector-and...

 

Hope that helps,

 

Ollie

 

DataPirate26
10 - Fireball

@OllieClarke Thanx for the confirmation. I will try it and If there are any updates I will comment on it. Thanx for all your assistance. 

DataPirate26
10 - Fireball

@OllieClarke I tried with your solution in my Actual Workflow but its not giving me correct result. Can you please suggest me what may be the reason for this ? Screenshot attached below. See the Nulls are not getting replaced by the Start date. 

OllieClarke
15 - Aurora
15 - Aurora

@DataPirate26 it will work when you run as an app, but if you want to run as a workflow, then you need to set a default value for the interface tools. 

 

In the Workflow configuration you'll see two new Question constants for your interface tools. Simply put in some default values (which will be overwritten by whatever the user chooses), and then it will work as both a workflow and an app

DataPirate26
10 - Fireball

@OllieClarke That is right. It works when running through App. but I wanted to test it because there are total of 3 lakhs Data in it. So can you guide me once how to Put some default value to it so that I can run in the workflow also and check if the data is flowing properly or not as I have to Perform some more data transformation with the data. 

OllieClarke
15 - Aurora
15 - Aurora

@DataPirate26 You can add default values to the interface tools in the workflow tab of the workflow configuration. I'd recommend naming your interface tools (in their annotations tab), and then you can simply type in the default value that you want

OllieClarke_0-1664357001878.png

 

Labels