Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Combined Two Endswith Expressions

hellyars
13 - Pulsar

How can I combine 2 Endswith expressions?

 

I tried ENDSWITH(ENDSWITH ([FIELD],"A"),"C"). FIELD is a V_String. It generated the ERROR = Parse Error at char(0): Formula: tried apply string operator to numeric value EndsWith.   

6 REPLIES 6
Simha
9 - Comet

ENDSWITH function returns boolean, so your outer ENDSWITH function is essentially passing a boolean instead of string, hence the error.

 

May I know what exactly is your requirement? 

 

kelsey_kincaid
12 - Quasar

Hi @hellyars ,

What are you trying to accomplish? Your formula as written is checking whether the output of 

 

ENDSWITH([Field],"A") 

 

ends with the letter C. The output of ENDSWITH is a numeric value (-1 when true, 0 when false).

hellyars
13 - Pulsar

I am looking for all records that literally end in A or C.  

Simha
9 - Comet

May be I am over simplifying, but why don't you try an OR condition like below?

 

Simha_0-1583437258724.png

 

hellyars
13 - Pulsar

I guess I could just use two expressions with an OR statement.

hellyars
13 - Pulsar

You are not.  I was just trying to figure a way to join 2 without using OR.  

Labels