Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.

Alteryx Designer Desktop Discussions

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

IF Statement in Alteryx is working for some of my data

Ash1293
6 - Meteoroid

Hi,

 

I have an Alteryx module which i have created and i have added this Formula in saying:

'IF [Trade Price]-[TRADE 1]=0
Then 'Yes'
Else 'No'
ENDIF'

 

Ash1293_0-1643015435020.png

Ash1293_1-1643015645702.png

Ash1293_2-1643015663384.png

 

 

I have attached the first 10 rows which should that the two columns are matching but Alteryx is showing a Else result.

 

I know that out of 129,000 Records the formula is working for 74,000 records but there are 54,000 records which are showing as No but in there are records that should say yes

 

11 REPLIES 11
atcodedog05
22 - Nova
22 - Nova

Hi @Ash1293 

 

You can use a select tool and filter only required columns and see the data. As I can see  [Trade Price] and [TRADE 1] are not same hence its no.

 

Workflow:

atcodedog05_0-1643016005149.png

 

Hope this helps : )

 

Ash1293
6 - Meteoroid

I have tried this but it hasn't worked.

 

For the data i attached, it does give me the expected result with comparing Trade Price and TRADE 1 however for these examples it is failing when comparing Shelf Edge Price to Trade 2.

 

 

Ash1293
6 - Meteoroid

@Atcodedog05

 

atcodedog05
22 - Nova
22 - Nova

Hi @Ash1293 

 

That is strange it's working for me

 

atcodedog05_0-1643017635863.png

 

Hope this helps : )

 

Ash1293
6 - Meteoroid

Hi @Atcodedog05,

 

 Okay, it's really weird as i am still running into this error. It seems to still not recognise that the Shelf Edge and Trade 2 match in set rows.

 

I have the select before to confirm all the data is selected in correct format. I can see in later stages that the formula is working but with the 10 examples is just a sample of data which is not working with the formula with my module.

Ash1293
6 - Meteoroid

Hi,

 

So i have ran build this and re ran this multiple times now and i still get the same issue where some rows are still failing with the formula where some are working correctly. is there any more i can do to get this to work

atcodedog05
22 - Nova
22 - Nova

Hi @Ash1293 

 

Provide an example where it's failing I can take a look.

Ash1293
6 - Meteoroid

No Problem,

 

Ash1293_0-1643036174391.png

 

I have attached the output called test sample simpled down to first 100 records which is the data that is going into this sequence after the join as well as the first 10 rows after the formula to match the rows has failed

atcodedog05
22 - Nova
22 - Nova

Hi @Ash1293 

 

I could see Trade Price and Shelf edge price has more decimals hence its failing. Using select tool and convert to fixed to have only 2 decimal points. In 19.2 2 is the number of decimals.

 

Workflow:

atcodedog05_0-1643037257399.png

 

Hope this helps : )

 

Labels