We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to dynamically drop columns if they add no value

asadh99
6 - Meteoroid

I am working on a dataset in which I would like to keep a historical record of every time a vehicle has last been inspected.

 

However there are certain instance where the "previous date completed" column is not very useful.

 

It either contains dates that are already recorded in the newest report or no data at all. 

 

If that is the case I would like to dynamically drop that column without having to use the select tool and manually inspect each record.

 

If however there is a date in the "previous date column" that is not captured in the newest report I want to keep that column in the final output.

 

I have tried using a multi field formula to capture if the column adds no value and if all the values are = 1 then I'd want to drop that column.

 

I'm sure there's a much easier way of accomplishing my goal.

 

Any tips or help would be greatly appreciated.

14 REPLIES 14
alexnajm
18 - Pollux
18 - Pollux

How about the "Remove null columns" option of the Data Cleansing tool?

asadh99
6 - Meteoroid

Unfortunately there are scenarios where the new date column will also have nulls and will cause issues downstream. 

asadh99
6 - Meteoroid

There are also other columns that will come into play that contain nulls

alexnajm
18 - Pollux
18 - Pollux

Ok then to be honest I am not sure what you are trying to accomplish - can you post your expected output? and can you make your workflow an .yxzp so it includes the data in it?

alexnajm
18 - Pollux
18 - Pollux

If you want any sort of dynamic way to select columns, the Dynamic Select is your best bet

asadh99
6 - Meteoroid

Interesting. Would you be able to show me an example of how to do this with the current data set I provided?

alexnajm
18 - Pollux
18 - Pollux

I cannot as there is no data provided as mentioned - you need to Export Workflow to include the data.

 

I also don't know your expected output

asadh99
6 - Meteoroid

Here is my workflow

alexnajm
18 - Pollux
18 - Pollux

This still does not have the data as I cannot access your OneDrive where the file is - please Export Workflow

Labels
Top Solution Authors