Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

Alteryx Designer Desktop Discussions

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

Multi Formula

EvansM
9 - Comet

Hello, 

I need help with this scenario

I have a millions of records as shown below. I need help how to handle that. Thx 

 

 

Sample                         Expected results

customer_id              Customer_id

1004405-01                1004405-01

1004405-12

1004405-117

1004405-11

10044325-01            10044325-01

10044650-04            10044650-04

10086785-15            10086785-15

10086785-16

1008800-00             1008800-00

1008800-01

10090326-05           10090326-05

10091690-07            10091690-07

3 REPLIES 3
AngelosPachis
16 - Nebula

Hi @EvansM ,

 

You can achieve this by first using a text to columns tool to split on the - and then use a multi-row formula tool to check if it's the first occurrence of the first element

 

AngelosPachis_0-1631128030516.png

 

Cheers,

Angelos

Maskell_Rascal
13 - Pulsar

Hey @EvansM 

 

You can technically do this in one Multi Row Formula tool, but it could potentially slow down your workflow by using a RegEx formula since you have millions of rows to go through. The formula would look like this:

IF REGEX_Replace([Input], '(\d+)(\-.*)', '$1')=REGEX_Replace([Row-1:Input], '(\d+)(\-.*)', '$1') THEN Null() ELSE [Input] ENDIF

Maskell_Rascal_0-1631129041323.png

 

Cheers!

Phil

EvansM
9 - Comet
Labels