Alteryx Designer Desktop Discussions

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

Help Generating Rows based on multiple conditions

aria_rahshid1
6 - Meteoroid

Hello,

 

I need help building out the logic that will insert a row based on a few conditions. 

 

When the hours type = HSB and the max date for "HSB" hours type is older than "forecast" hours type max date then insert a row with the hours set to 40

 

 

DateEmployee IDHours_TypeHoursMin DateMax Date
2020-01-1901Actual382020-01-192020-02-09
2020-01-1901Forecast192020-01-192020-04-05
2020-01-1901HSB402020-01-192020-02-09

 

Please let me know if you can help.

 

Thank you,

 

Rahshid 

2 REPLIES 2
Aaron_Harter
11 - Bolide

@aria_rahshid1 Hi Rahshid, check out the attached solution, hopefully you can use similar logic to identify the new rows to be generated, then use a union tool to add the data points back to the main data table:

3.PNG

aria_rahshid1
6 - Meteoroid

Hi Aaron,

 

Thanks for the help. Your workflow helped , but was quite what I was looking for.  Essentially I want to generate one l additional row for HSB until i reach the max forecasted date. So if an employee shows forecasted hours all the way through april 5th I want an HSB record inserted until april 5th . What would you adjust in your workflow to accomplish this or do you have another idea to solve this problem ?

 

Kind Regards,

 

Rahshid

Labels