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

Count in a Concatenation Field

ZoeM
8 - Asteroid

Hi Community.

Trying to figure out how to set up my concatenation.

I am creating a new filed which is a concatenation of other fields, so pretty much a High Level Summary.

I also want to count how many times a value comes up in a field and have it part of the concatenation. Something like the below:

 

A + B + C + count(how many times G appears in Field D) = ABC8

 

strictly for illustrations sake. 

 

I hope I explained that well. 

 

Thanks in advance!

4 REPLIES 4
KP_DML
8 - Asteroid

this formula will work for the example given. The third parameter for REGEX_CountMatches sets whether it is case-sensitive or not.

 

[A] + [B] + [C] + ToString(REGEX_CountMatches([D], 'G', 1))

 

 

joshuaburkhow
ACE Emeritus
ACE Emeritus

You can do it something like this...

 

joshuaburkhow_0-1579805881796.png

Joshua Burkhow - Alteryx Ace | Global Alteryx Architect @PwC | Blogger @ AlterTricks
ZoeM
8 - Asteroid

I developed the new fields. 

What I need now is the sum of '1' occurrences concatenated to the A, B, and C? 

 

 

fmvizcaino
17 - Castor
17 - Castor

Hi @ZoeM ,

 

Pretty much the same idea if you want to find how many times the number 1 appears in [D].

[A] + [B] + [C] + ToString(REGEX_CountMatches([D], '1', 1))

 

Best,

Fernando Vizcaino

Labels