Alteryx Designer Desktop Discussions

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

Dynamically Join Strings

DavidKennedy
7 - Meteor

Hello again everyone,

 

I commonly have to suppress data from certain plants while they are undergoing system maintenance, implementation, etc.  I have to document which plants' data has been suppressed from the reports generated.  Its easy enough for me to list the plants in a column but I need a way to join the records in that column so I can have them as a single text string (separated by commas) that I can add to the header of a report.  The issue is the number of plants varies from report period to report period.  Below is an example of what I'm working with and what I need.  

 

Here's an example of list of plants for which I suppressed their data.

DavidKennedy_0-1686000672225.png

 

I need to have a single string that would read as "Springfield, Quahog, Eternia, Narnia, and Risa" which I could then use downstream as a header for a report.

 

I also need this to be dynamic in that it "knows" how many plants (records) there are and can automatically adjust the list length accordingly.

 

For example, one week the list would read as above but the next week it might only have 3 plants as below.

 

DavidKennedy_1-1686000955396.png

 

For this one I'd need the list to be "Springfield, Narnia, and Risa".

 

Any help will be greatly appreciated.

 

Thanks,

David

3 REPLIES 3
SPetrie
12 - Quasar

Use the concatenate option in a summarize tool

SPetrie_0-1686001362312.pngSPetrie_1-1686001376816.png

 

Yoshiro_Fujimori
15 - Aurora

@DavidKennedy ,

 

As @SPetrie mentioned, Summarize tool can do the trick.

In Summarize tool configuration, select the field you want to concatenate and choose [String] - [Concatenate]

 

Summarize tool cofiguration

Yoshiro_Fujimori_0-1686006167265.png

You can also configure the separator (default is comma as below.)

Yoshiro_Fujimori_1-1686006220894.png

 

Input

Yoshiro_Fujimori_2-1686006282510.png

Output

Yoshiro_Fujimori_3-1686006295372.png

 

For further details, you may want to check Interactive Lesson : Summarizing Data especially Section [Action Properties]

 

Good luck.

Qiu
20 - Arcturus
20 - Arcturus

@DavidKennedy 
Some good replies are there already but I still want to give mine if I can.
I add one space after the comma for the seperator so it looks more like a sentance as a header.
And I replace the last comma and Space to space+and+ space to be exact as you requested.

0606-DavidKennedy-A.PNG0606-DavidKennedy-B.png

Labels