Alteryx Designer Desktop Discussions

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

Complex IF Formula Required

insomned
8 - Asteroid

I want to concatenate cells from multiple columns in my dataset, separated by a semicolon. Some of the columns however, have [Null] values in them and so when I concatenate, I just get another semicolon (and this shouldn't be since each of the data points can only be separated by ONE semicolon). 

 

I guess I have to write an IF formula for IF the particular cell (under column) is empty (ie [Null]) then do not include it. There are multiple columns too.

 

Help would be appreciated! 

7 REPLIES 7
atcodedog05
22 - Nova
22 - Nova

Hi @insomned 

 

First I am concating then I am removing all the extra semicolon using regex and trim. This way I don't need to use any complex IFs 😅

 

Workflow:

atcodedog05_0-1628871758623.png

 

Hope this helps : )

 

insomned
8 - Asteroid

Looks good, but doesn't really work on my data since I have 8 columns like that and sometimes only 2 or 3 of them have data. 😞

atcodedog05
22 - Nova
22 - Nova

Hi @insomned 

 

Please find the updated workflow. This should handle 🙂

 

atcodedog05_0-1628872542784.png

 

Hope this helps : )

 

insomned
8 - Asteroid

Thank you so much!! 🙂 

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @insomned 

If the response helps please don't forget to mark it as solution.

Cheers and have a nice day!

insomned
8 - Asteroid

Have an amazing day yourself!

jrgo
14 - Magnetar

@insomned 

 

Here's an alternate approach if looking for a dynamic approach. RecordID tool is used for grouping, but can use your own if your data already has a unique row identifier.

 

Data is transposed on the group and then use a summarize tool to concatenate. The concat function automatically ignores NULL fields. Results are joined back on the record id.

 

The dynamic part is in the Transpose tool where you can set it to automatically include new fields found (Dynamic or Unknown Columns).

 

jrgo_0-1628894975188.png

 

Labels