Hi,
I have a workflow where I'm able to split the incoming data into two groups (let's say A and B) based on the value in one field (I actually do this in the SQL queries at the beginning...then I join the results of the two queries after doing so; "A" is only in one query, whereas "B" is in both datasources). I want to have a third group called "All" in addition to A and B in my output. Not sure if there's a way to do this in SQL or in Alteryx, but there's got to be a way, right? Thanks in advance.
Solved! Go to Solution.
I'm not in front of Alteryx at the moment so can't make a sample but think the following should work
Take the output of the SQL and use a formula tool to replace the group value (A/B) with 'All'.
Use a union tool to take the original output of SQL and the output of the formula tool.
The resulting output should then have all three groups (A/B/All)
Brilliant! Thanks, man!
Well, thanks for the previous answer, but NOW, "All" is getting truncated in the output. I've used Join and Union to try to eliminate it, but it's still showing up as "Al" instead of "All" (the data I'm replacing are actually two characters in length). Help again?
Put a select tool after the sql input. Use this to increase the length of the grouping name to 3 characters. Then it will be fine.
Works like a charm. Thanks again!