Hello everyone!
I have the situation bellow:
I'd like to group the columns Group1, Group2, Group3 and Group4 in one column (can be a new).
How can I do it?
Solved! Go to Solution.
HI @FabioP,
You are looking for the Transpose Tool.
Select all columns besides the Group 1-4 columns. You'll get two new columns, one with the column name (Group1-4) and one with all the values. Use a Select Tool behind and rename the Value Column to 'Group 1' and deselect the 'Names' column. You'd also need a Filter tool to remove the null values.
I have mocked up a quick example:
Result:
I'll attach the workflow for reference, let me know what you think!
Best
Alex
Hi @FabioP ,
There are several ways, but I'm sharing one that is dynamic and it wil work for any amount of groups that you have.
You can also solve this by using an IF THEN ELSE condition, but you would need to right one adicional ELSEIF for each group.
Best,
Fernando Vizcaino
It's Alteryx, so there is a hundred different ways to do it. Based off your data, this could be done with a Formula tool and a "If" statement. It would look something like:
Choose your group 1 field or create a new field:
If IsEmpty([Group 1]) THEN [Group 2]) ELSEIF
IsEmpty([Group 1]) and IsEmpty([Group 2]) THEN [Group 3] ELSEIF
IsEmpty([Group 1]) and IsEmpty([Group 2]) and IsEmpty([Group 3]) THEN [Group 4] ELSE "Needs Review" ENDIF