I have the below data with me:
Name | Request Status | Start Date | End Date | Start Date2 |
ABC | 4 | 11/21/2023 | 11/22/2023 | 11/15/2023 |
ABC | 3 | 11/23/2023 | 12/1/2023 | 11/15/2023 |
ABC | 6 | 12/4/2023 | 12/5/2023 | 11/15/2023 |
ABC | 7 | 12/6/2023 | 12/7/2023 | 11/15/2023 |
ABC | 6 | 12/8/2023 | 12/12/2023 | 11/15/2023 |
ABC | 7 | 12/13/2023 | 12/13/2023 | 11/15/2023 |
ABC | 4 | 12/14/2023 | 12/15/2023 | 11/15/2023 |
ABC | 14 | 12/18/2023 | 12/18/2023 |
11/15/2023 |
Now, I need to compare the Start date column with Start Date2 column as:
if Start Date2 < min(Star Date), add 1st row as below:
Name | Request Status | Start Date | End Date |
ABC | "Not Available" | 11/15/2023 | 11/20/2023 |
ABC | "4" | 11/21/2023 | 11/22/2023 |
ABC | "3" | 11/23/2023 | 12/1/2023 |
ABC | "6" | 12/4/2023 | 12/5/2023 |
ABC | "7" | 12/6/2023 | 12/7/2023 |
ABC | "6" | 12/8/2023 | 12/12/2023 |
ABC | "7" | 12/13/2023 | 12/13/2023 |
ABC | "4" | 12/14/2023 | 12/15/2023 |
ABC | "14" | 12/18/2023 | 12/18/2023 |
To achieve this in Alteryx, you can use the following steps:
Sort Tool:
Formula Tool:
Filter Tool:
Union Tool:
Formula Tool:
Select Tool:
The workflow above will add the required rows with "Not Available" in the "Request Status" column based on the condition you specified. Ensure that the column names and data types match between the original and filtered data to successfully perform the union.
User | Count |
---|---|
106 | |
82 | |
70 | |
54 | |
40 |