Alteryx Designer Desktop Discussions

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

multiple row fomula question

187
8 - Asteroid

Hi Alteryx engineer,

 

I have some data like this

A
B
C
1
2
3
TOTAL
D
1
2
3
TOTAL
E
F
G

I Want to concatenate string under C and D section and  output like below, how can i implement?

A
B
C
C1
C2
C3
TOTAL
D
D1
D2
D3
TOTAL
E
F
G
3 REPLIES 3
Yoshiro_Fujimori
15 - Aurora

Hi @187 ,

 

Here is one way of doing this.

 

Workflow

Yoshiro_Fujimori_0-1687153930924.png

 

Multi-Row formula expression

Output =

IF RegEx_Match([Data], "\d+")
THEN [Row-1:Output]
ELSE [Data]
ENDIF

 

Formula tool expression

Output =

IF REGEX_Match([Data], "\d+")
THEN [Output] + [Data]
ELSE [Output]
ENDIF

 

Output

Yoshiro_Fujimori_1-1687154166714.png

 

187
8 - Asteroid

Hi @Yoshiro_Fujimori  

Thanks for the reply, yes this is working for the case, just wondering if the 1 2 3 is not number , and it is string as well, what is the advice?

 

Yoshiro_Fujimori
15 - Aurora

Hi @187 ,

It depends on the condition to distinguish the Level-2 string (1, 2, 3...) from the Level-1 string (A, B, C...).

 

Currently, the strings are distinguished whether it is all numbers or not (in Multi-Row formula and Formula) as below:

REGEX_Match([Data], "\d+")

If there is a different rule, you can modify the regular expression accordingly.

Labels