Hi Experts,
I'm new in Alteryx development. Please help me in a logic and finding activities.
I have similar number of Doc id and I want to Mark document as "Y" if at least one line has this code "03" or "02",
as shown below.
This should be the expected result-
Doc Id | Code | Status |
3092 | 03 | Y |
3092 | 01 | Y |
3092 | 05 | Y |
4195 | 01 | N |
4196 | 05 | N |
4196 | 05 | N |
4196 | 07 | N |
4196 | 07 | N |
4298 | 05 | Y |
4298 | 02 | Y |
4298 | 05 | Y |
Thanks in Advance.
Solved! Go to Solution.
Hi @AS
Here is how you can do it.
Workflow:
1. Filter rows with "02" or "03".
2. Groupby to get unique Doc IDs .
3. Using Formula tool to add Y flag.
4. Joining back Flags to data using find and replace tool (similar to vlookup).
5. Replace "N" with "Y" for Doc Ids with "02" or "03"
EDIT: updated with last logic.
Hope this helps : )
Happy to help : ) @AS
Don't want to step on any toes, but this problem can be solved simply by grouping on Doc Id, concatenating the Code, setting the Status by using Contains() on that concatenated value, then joining back on Doc Id.
No issues @BetterFerret always exciting to learn different ways to solve it.