The Alteryx Community is a finalist in three 2026 CMX Awards! Help us win Customer Support Community, Most Engaged Community, and User Group Program of the Year - vote now! (it only takes about 2 minutes) before January 9.
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

If Contains and Equals Then Statement

NicoleMA
7 - Meteor

So I am horrible with If/Then Statements. I am trying to make a new column (vstring) that flags rows that need to be looked at based on what is in two columns.

The Top ZIP Sales ADI column is a vstring and the info in that column will look like this: Palm Springs, CA - 186, Los Angeles, CA - 812, etc.

The Percent of Total Circ by Market column is a double and would read like this: 1 or .022 etc

 

 

Here is what I came up with:

IF ([Top ZIP Sales ADI] contains "812") && ([Percent of Total Circ by Market] = 1) THEN "Ok" ELSE "Check" ENDIF

2 REPLIES 2
MarqueeCrew
20 - Arcturus
20 - Arcturus
IF
Contains([Top ZIP Sales ADI],"812") &&
[Percent of Total Circ by Market] == 1
THEN "Ok"
ELSE "Check"
ENDIF

pretty close @NicoleMA

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
NicoleMA
7 - Meteor

It works! Thanks!

Labels
Top Solution Authors