Inspire EMEA 2022 On-Demand is live! Watch now, and be sure to save the date for Inspire 2023 in Las Vegas next May.
We'll be completing standard maintenance for our Single Sign-On system on November 30th 6pm Pacific Time for approximately one hour. During this time My Alteryx and sign-in functionality to all My Alteryx programs (Licensing Portal, Community, Beta Program, Case Portal, and others) may be inaccessible. Thank you for your patience.

Alteryx Designer Discussions

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

Mapping account type

SH_94
11 - Bolide

Dear community,

 

I would like to ask how do we create formula in order to get the result as below:

If the account start with number of 2 series, then the type will be BS

if the account start with any letters and follow by the number of 2 series , then the type will be BS

if the account start with any letters and follow by the number of 9 series, then the type will be Control

if the account start with any letters and follow by the number of 1 series, then the type will be BS

if the account start with any letters and follow by the number of 3 series, then the type will be BS

If the account start with number of 9 series, then the type will be Control

If the account start with number of 4 series, then the type will be PL

if the account start with any letters and follow by the number of 4 series, then the type will be PL

 

SH_94_0-1664380441160.png

Thank you

 

3 REPLIES 3
binuacs
17 - Castor

@SH_94 One way of doing this

binuacs_0-1664383289076.png

 

SH_94
11 - Bolide

Hi @binuacs ,

 

Many thanks for the prompt response. Can u briefly explain how do i read this formula :

IIF(Substring([Account],1,1) IN('1','2','3')

 

Thank you.

binuacs
17 - Castor

@SH_94 The substring function will return the string based on the start position and the length. In this example, the starting position and the length are 1, so it will return the second letter from the string because the Substring function always starts from 0. 

 

IIF(Substring([Account],1,1) IN('1','2','3') - the substring functions returns the second character from the string Account and checks whether it is in 1,2 or 3

 

https://help.alteryx.com/20221/designer/string-functions

 

binuacs_0-1664384455005.png

 

Labels