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

IF formula for data that starts with a specific number

Metadata21
8 - Asteroid

Hi 

 

This is most likely a simple formula but I want to capture anything that starts with the number 1 in the image attached as a formula in alteryx 

 

thank you!

3 REPLIES 3
DataNath
17 - Castor
17 - Castor

Hey @Metadata21 you can check for the number starting with '1' using the StartsWith() function in the Formula tool. However, as this is a string function, you'll first need to wrap the CombAcct field in ToString() to apply this. When you say you only want to capture this, I don't know what you wanted to do with those entries where this isn't the case. In the Formula example, I've just set anything else to null. However, if you only want to see entries that begin with 1, then you can also use a Filter tool to remove others. Both appear below and in the attached workflow:

 

Incoming:

 

DataNath_0-1662927898395.png

 

Formula output:

 

DataNath_1-1662927912091.png

 

Filter output:

 

DataNath_2-1662927926806.png

grazitti_sapna
17 - Castor

Hi @Metadata21 , You can achieve your desired result by using Filter tool and filter out the records starting with 1 which I think you are already aware. If by Capture you mean that you want to store this data in some file form then you can refer my workflow. I have created a temporary PDF document from the output received. If it meets your need or in case your requirement is different let me know.

Sapna Gupta
Metadata21
8 - Asteroid

@DataNath @grazitti_sapna thank you both for your help - both solutions worked :-) 

Labels