Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

Formula

Kjaer
8 - Asteroid

Hi again

 

I have these three lines. In one "fomula" I have made a calculations for each column A, B and C. But if my data do not contain any data for f.ex column C (that means that there will only be a column A and B), I would like to make a condition, that if no column C, then just skip the calculation.

 

If the formula can be made in a better way, so I am open for any solution :-)

 

NumberABC
500051015
5001102030
5002153045
2 REPLIES 2
sparksun
11 - Bolide

My solution with comments in the workflow, pls check.

ArnaldoSandoval
12 - Quasar

Hi @Kjaer 

 

Alteryx does not feature a function to check a column is present in the data  stream 😐 over the years this had been handled in different ways, we even have a macro to handle this scenario

 

The macro is the most elegant way to handle missing columns, and I prefer its first version; actually the CReW version only add some validation to force the whole CReW is installed with all its macro, which may not be wise, as it force the installation of CReW everywhere or you modify their macro to removed their validation.

 

Hope this helps,

Arnaldo

 

PS: The attached package contains all the macros, it is up to you to pick the method you prefer.

 

 

 

Labels