In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

How to Make a Number and Comma combination from a single number in Formula or Other?

JessicaXChung
6 - Meteoroid

I've attached an Alteryx workflow for reference, essentially I can't quite think of a way to write a formula that will generate a number and comma combination from a single number.

What I am looking for is:

Input

Input - Single numberOutput - Each number going up to the number with a comma in between. No comma at end
41,2,3,4
51,2,3,4,5
61,2,3,4,5,6
71,2,3,4,5,6,7

 

Has anyone done this before and how was it done? I'm thinking that I have to do some multi row formula but I'd really like to have it done in Formula. An option I am thinking of is to use a for loop in the Formula tool itself is that possible?

 

2 REPLIES 2
alexnajm
19 - Altair
19 - Altair

Something like this?

DataNath
17 - Castor
17 - Castor

Hey @JessicaXChung, you can generate rows up to the number in your reference field. After that, just convert the new field to a string data type and you can concatenate the values in a Summarize tool, grouping on your original field:

 

DataNath_0-1680533680464.pngDataNath_1-1680533687155.png

Labels
Top Solution Authors