This site uses different types of cookies, including analytics and functional cookies (its own and from other sites). To change your cookie settings or find out more, click here. If you continue browsing our website, you accept these cookies.
General Discussions has some can't miss conversations going on right now! From conversations about automation to sharing your favorite Alteryx memes, there's something for everyone. Make it part of your community routine!
Hello
RowId | FirsName | LastName | PID | Type | Key | Other1 | Other2 | Status |
1 | John | Doe | 18177 | 101 | K1 | -- | -- | S1 |
2 | John 2 | Doe 2 | 18177 | 45 | K1 | S2 | ||
3 | John 3 | Doe 3 | 18178 | 46 | K1 | |||
4 | John 3 | Doe 3 | 18177 | 101 | K1 | S1 | ||
5 | J2 | D2 | 18177 | 200 | K1 | |||
6 | J3 | D3 | 18178 | 200 | K1 | |||
7 | G1 | B1 | 19155 | 200 | K2 | |||
8 | G2 | B2 | 19155 | 101 | K2 | |||
9 | G2 | B2 | 19155 | 102 | K2 | |||
10 | G1 | B1 | 19155 | 200 | K3 | |||
11 | G2 | B2 | 19155 | 101 | K3 | S1 | ||
12 | G2 | B2 | 19155 | 45 | K3 | S2 |
E.g. Want to group by "Key" and apply formula to modify status -
.e. if type = 101 then Status = S1
if type = 45 then Status = S2
Please let me know if this is not clear.
Thank you
You can solve this within the formula tool using conditional logic. Below is an example, but you can build it out for your use-case.
Another option is to use the initial logic (Key = 'K1' AND Type In (101, 45, ...) and apply the formula logic after that. If needed, you could even union the filtered out dataset back after you apply the formula.
I create a simple workflow that is fairly rough. You could probably reach the same endpoint with fewer tools but this is how I thought to do it. I hope this helps and feel free to ask any questions you have on it.
I abbreviated the data to only the columns that mattered for this question. I am first manipulating the data by changing the 102 and 46 to 101 and 45 because they are roughly the same for the desired checking and make the sorting formulas easier. Then I just check which keys do indeed match both and filter out the keys that don't using the join then just sort and add the status column.