Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Formula to get actual difference (AD), singlet and blank as last column using formula tool

Desaisid
Meteoro
Spoiler
 

Hi,

For 'Rate' and 'Rate 2', I wanted to compare and get a result in 'Fixed rate check test' column

 

RateRate 2Fixed rate check Test
2.781.02AD
2.780.2AD
2.780.2AD
2.780.53AD
 3.85Singlet
01AD
2.90000000002.9AD
2.93000000002.93AD
2.93000000002.93AD
2.93000000002.93AD
2.93000000002.93AD
2.93000000002.93AD
2.93000000002.93AD
3.21000000003.21AD
3.21000000003.21AD
3.25500000003.255AD
3.28000000003.28AD
3.28000000003.28AD

 

I'm using below formula

 

Desaisid_0-1687273775080.png

 

I wanted to get only those numbers where I see actual difference as AD, and I want below bold as blank.

 

RateRate 2Fixed rate check Test
2.781.02AD
2.780.2AD
2.780.2AD
2.780.53AD
 3.85Singlet
01AD
2.90000000002.9 
2.93000000002.93 
2.93000000002.93 
2.93000000002.93 
2.93000000002.93 
2.93000000002.93 
2.93000000002.93 
3.21000000003.21 
3.21000000003.21 
3.25500000003.255 
3.28000000003.28 
3.28000000003.28 
8 RESPUESTAS 8
Clifford_Coon
Bólido

Hi @Desaisid ,

 

It looks like your data types might not be the same, one appears to be a double and the other a fixed decimal.

 

that may help.

 

Actual they may be string fields, try making the same type as all double

binuacs
Polaris

@Desaisid One way of doing this

binuacs_0-1687274919295.png

 

cjaneczko
Púlsar

Adding a select tool to your workflow and changing the Rate and Rate 2 to Double will let your formula work correctly. 

Desaisid
Meteoro

After changing it to Double what data type I should keep for 'Fixed rate check test'

Desaisid
Meteoro

I have 94 different formulas which I have to change if I change this 1, Can you help me with my current formula as how can I change in this one. Like what data type should I use for all 3 columns

binuacs
Polaris

@Desaisid Rate1 and Rate2 should be double and result should be string type

Desaisid
Meteoro

I have put Double in both rates and Result in string type it is showing me error

 

Desaisid_0-1687278986284.png

 

binuacs
Polaris

@Desaisid Can you screen shot the metadata in your formula tool

binuacs_0-1687279270437.png

 

 

 

Etiquetas
Autores con mayor cantidad de soluciones