Hello, I am new to Alteryx and this is probably very simple for everyone; but I am having a challenging time trying to figure this out.
I have a list of data that I am comparing two rows to determine if criteria is met, if my criteria is met, I would like to add a "1" to the new field in both rows. Here is an example:
if ([row-1:record id] = record id]) and ([row-1:date 1] = [date 1]) then "1" else "0" endif
Of course this logic, only places a "1" on the second record new field. How do I also put a "1" in the new field of the first record, as well?
BEFORE
| record id | date 1 | new field |
| 1234 | 5/3/2017 | |
| 1234 | 5/4/2017 | |
| 1235 | 5/5/2017 | |
| 1235 | 5/5/2017 | |
| 1236 | 5/6/2017 | |
| 1236 | 5/6/2017 | |
AFTER (WHAT I'M TRYING TO ACCOMPLISH)
| record id | date 1 | new field |
| 1234 | 5/3/2017 | 0 |
| 1234 | 5/4/2017 | 0 |
| 1235 | 5/5/2017 | 1 |
| 1235 | 5/5/2017 | 1 |
| 1236 | 5/6/2017 | 1 |
| 1236 | 5/6/2017 | 1 |
Any assistance would be greatly appreciated.
Thanks