Announcement | We'll be doing maintenance between 2-3 hours, which may impact your experience. Thanks for your patience as we work on improving the community!

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Many filters, input results of all filters into one column.

wonka1234
10 - Fireball

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?

 

wonka1234_0-1647988755067.png

 

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.

6 REPLIES 6
JarekSkudrzyk
11 - Bolide

@wonka1234 

hi, try the union tool - it can merge multiple inputs into single data stream.

wonka1234
10 - Fireball

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.

 
 
 
 

 

wonka1234
10 - Fireball

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.

dkoenawan004
7 - Meteor

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. 

dkoenawan004_0-1647990802417.png

 

 

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. 

dkoenawan004_1-1647990864229.png

 

 

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:

dkoenawan004_2-1647990967052.png

 

 

Sample workflow attached:

 

 

 

Does this achieve your objective?

TheOC
15 - Aurora
15 - Aurora

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


Bulien
wonka1234
10 - Fireball

@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.

Labels