Alteryx Designer Desktop Discussions

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

Simple Subtraction

ZoeM
8 - Asteroid

Hi!

I have a field Field 2 that I want to modify the design of the result by using the Formula Tool. Please see below:

[Field 1][Field 2][Desired Field 2 Result]
1000800800 (80%)

 

So really, a subtraction of the two, but modify the result in Field 2 so that it is the result and the subtraction in brackets. Dont really want to have a new field, but just keep the two fields and change the way the result looks. 

 

Any ideas?

 

Thanks!

5 REPLIES 5
gautiergodard
13 - Pulsar

hey @ZoeM 

would this work?

BS_THE_ANALYST
14 - Magnetar
14 - Magnetar

@ZoeM you can do it like this, customise it as you wish:

BS_THE_ANALYST_0-1680197440889.png

 

All the best,
BS

LinkedIN

Bulien
ZoeM
8 - Asteroid

So is it the tostring portion that wont allow to stay within the same field?

BS_THE_ANALYST
14 - Magnetar
14 - Magnetar

@ZoeM if you check the datatype of the field you are currently working on, you will notice it's a numeric:

BS_THE_ANALYST_0-1680197578311.png

 

That means you can't turn it into a String column which you are effectively wanting to do. However, you could use my approach above what does that all in one go, or you could break it into steps:

1) Change datatype of the column to string:

BS_THE_ANALYST_1-1680197652663.png

2) drag a formula tool on. This would allow you to get that custom look you're wanting:

BS_THE_ANALYST_2-1680197683099.png

3) then add the customised part:

BS_THE_ANALYST_3-1680197782570.png

 

In essence you can do this with two tools like I've shown here, or you can use one like I did above. Whatever works best for you.

 

All the best,

BS

 

All the best,
BS

LinkedIN

Bulien
gautiergodard
13 - Pulsar

@ZoeM yes you need the tostring() in order to have the % symbol in your field since you are combining numeric and non numeric fields into an overall sting frield.

Labels
Top Solution Authors