Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Formula Tool Mastery Question

Airedelapaz
8 - Asteroid
Spoiler
Airedelapaz_0-1594933445769.png

Airedelapaz_1-1594933483575.png
Input:
Airedelapaz_2-1594933597006.png
Output:
Airedelapaz_3-1594933666132.png

I hate to have to ask such a beginner question, but I'm a beginner.  I'm working the ADAPT program and have a question on a conditional string expression within the Formula tool.  This is what I'm doing....wrong....  Can someone please help?  Also, the exercise mentions concatenate to add "$" to string.  Snippets in the Spoiler.

 

Thank you in advance for your help and if there's a smarter way to do this I'm all ears. 

3 REPLIES 3
markcurry
12 - Quasar

I think the issue is with your Length function, instead of IF Length([Formatted Total] = 😎 .... it should be IF Length([Formatted Total]) = 8.....

 

You could also just add a "$" with a + to your [Formatted Total] field.

Airedelapaz
8 - Asteroid

Bravo and thank you on the Length format!

 

How do I 'add' the '$' with a '+'?  

[Formatted Total] + '$'  ??

markcurry
12 - Quasar

Yes that's it, but you probably want to put it at front of the string...

 "$" + [Formatted Tool]

 

As you're are adding an extra character to the string, make sure you have a space for the extra character, so if the [Formatted Tool] is a string data type with size of 10 and you have a number 123,456.78, when you add the $ it will truncate the value to $123,456.7 unless you increase the size with a select tool first.  You mightn't need do, just check for any truncated warnings in the Results window.

Labels