Hi,
I have a dataset filters many times, I want to take the results of each of these columns and append them into one column.
How can this be done?
I am filtering these individually because I am replication a "For Loop" in python that loops through each column and gets non null values, then appends them all to one new column.
Thanks.
hi, try the union tool - it can merge multiple inputs into single data stream.
Union will give me many records, ie for first filter/column A I got 200 records, when I union it with the second filter/column B I get 400 records for column A.
I want 200 records to be in column A no matter what. I also would like to Append 200 records from A and the records from column B into one column.
I should also say my dataset has all the columns (A to D) in my filter. That could be why my union is giving me such high amounts of records.
Hi wonka1234,
Apologies but it's a bit hard to decipher what you're trying to achieve without an input and output sample but here is my interpretation of your questions and this thread. Let me know if this helps:
1. Input
You have a data table with multiple columns and for each of the columns, you have null and non-null values.
2. Output
You want to create a new column that collects just the non-null value. You also want the row number to be similar to the input, assuming that each column has one non-null value.
3. Suggested Process
Instead of creating filter for each column, which is not scalable can I recommend the following process in Alteryx:
1. Create a unique record ID
2. Transpose all the column you want to filter out to a column name-value combination, group by the record id
3. Filter for non-null values
4. Join back the record id to the original data set
This will look as follows:
Sample workflow attached:
Does this achieve your objective?
hi @wonka1234
Can you please give us an example input data, and an example output that you want?
Often the case when you are trying to replicate a python process in Alteryx, there can be many ways of achieving this, and i'd like to have a look at this problem with a step back.
Cheers,
TheOC
@dkoenawan004 @TheOC . See attached sample mockup. I have 12 columns where I want the non null values all appended one after each other in 1 new column. (IDfinal)
I also want to include the column other then the 12, ie Columns c_county, c_status
However I cannot seem to get columns other then the first 12 (non user ids) into this dataset of 6050 records.