community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Upgrade Alteryx Designer in 10 Steps

Debating whether or not to upgrade to the latest version of Alteryx Designer?

LEARN MORE

Data Labelling

Asteroid

Hi, I'm struggling to tag each row of the data with a Category define by End User.

Data.PNG

Data contains store detail from Col A:G.  I would like to return Category (A/B/Null) along each data under Col H. 

Category rule is specified in a separate worksheet

Rule.PNG

User will define String condition under Col A for Field "City".  E.g. If City contains "Springs", return Category A.  Anything outside this rule will return Null category.

 

Understand we can build the static logic in the designer, however our End-user doesn't have designer and will maintain the logic over a spread sheet instead. 

 

Attached spread sheet containing Database and logic.

 

Much appreciate if anyone can help here!  Happy New Year to all and wish you all success 2019.

Alteryx
Alteryx

Hi @jchan58

 

This sounds like a great use case for the Dynamic Replace Tool.

 

There are a couple great examples in the designer that should hopefully help you with what you need.

 

If you do get stuck, reach back out on here and I can build an example for you.

Asteroid

Hmmm, I thought a simple formula tool like this would work - but I keep getting everything coming up NULL:

 

IF Contains("SPRINGS", [City]) then "A"
ELSEIF StartsWith("LO", [City]) THEN "B"
ELSE Null()
ENDIF

 

Not sure why this isn't working

Alteryx
Alteryx

@michael_heitz - it needs to be read through from a separate workbook/file and not a formula within Alteryx itself, as the end user won't have Alteryx Designer.

 

Also, I think you have your string and fields the wrong way round, it should be:

 

IF Contains([City], "SPRINGS") then "A"
ELSEIF StartsWith([City], "LO") THEN "B"
ELSE Null()
ENDIF
Asteroid

I guess you need the case insensitive parameter to return the right Bool. thanks anyway

Alteryx
Alteryx

Both Contains and StartWith are case insensitive by default, so we are OK on that front, but well worth keeping that in mind when using string functions like this.

Labels