Free Trial

Alteryx Designer Desktop Discussions

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

Conditional Delet Columns

verast23
7 - Meteor

Hi Community,

 

I have to delete columns, if they include specific values. E.g.:

 

if Field 3 contains "Previous FC" and Field 6 contains "Previous Quarter", then these two columns should be deleted.

 

Field 1Field 2Field 3Field 4Field 5 Field 6Field 7
123872Previous FC9872000Previous Quarter387

 

Would be great if someone could help me. 

Thank you!

6 REPLIES 6
Emil_Kos
17 - Castor
17 - Castor

Hi @verast23,


I was thinking that I can sort it out with 2 formulas but it was a little bit more complicated.


First I have checked if the criteria are met. If yes I created a flag. Afterwards, I have used this flag to remove the data.

messi007
15 - Aurora
15 - Aurora

@verast23,

 

Please see below:

 

messi007_0-1617174670179.png

Attached the workflow,

 

Hope this helps,

Regards

verast23
7 - Meteor

Thanks @messi007  for your solution it works.

 

However, one more hurdle has occurred. In Field 3 & Field 6 is not always "Previous FC" & "Previous Quarter", so if Previous FC/Quarter isn't in Field 3/6, all columns should be shown.

 

If I remove Previous Quarter and Previous FC in your workflow, the filter tool gives me an error.

verast23
7 - Meteor

Hi @Emil_Kos ,

 

thanks for your solution. I still have the problem that the whole column was not deleted, although the criteria were met. I additionally got an warning message, that you are using a newer version of alteryx and that you possibly use tools that are not available for me.

afv2688
16 - Nebula
16 - Nebula

Hello @verast23 ,

 

How about this solution

 

Regards

verast23
7 - Meteor

Thank you @afv2688 ! Works perfectly.

Labels
Top Solution Authors