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.
SOLVED

IF formula within IF formula

Barclaysusercds
8 - Asteroid

Hi, I am trying to re-create this excel formula =IF(C2="",IF(D2="",E2,D2),C2) in Alteryx.

I wrote the below but the formula is only giving me stage 1. The second IF is not working. No error messages appear.

I tried both these formulae

Please can you help. Thanks in advance.

 

IF [Stage 1 DataLens Trade ID matched]="" THEN (IF [Stage 2
Business mapping]="" THEN [Stage 3 Assumption based] ELSE [Stage 2
Business mapping] ENDIF) ELSE [Stage 1 DataLens Trade ID matched] ENDIF

 

IF [Stage 1 DataLens Trade ID matched]="" THEN IF [Stage 2
Business mapping]="" THEN [Stage 3 Assumption based] ELSE [Stage 2
Business mapping] ENDIF ELSE [Stage 1 DataLens Trade ID matched] ENDIF

16 REPLIES 16
binuacs
21 - Polaris

@Barclaysusercds Can you try 

IIF(IsEmpty([Stage 1 DataLens Trade ID matched]), IIF(IsEmpty([Stage 2 Business mapping]), [ Stage 3 Assumption based], [Stage 2 Business mapping]), [ Stage 3 Assumption based])
grazitti_sapna
17 - Castor

Hi @Barclaysusercds , try this 

grazitti_sapna_0-1652797751186.png

IIF([Stage 1 DataLens Trade ID matched]="",IIF([Stage 2 Business mapping]="",[Stage 3 Assumption based],[Stage 2 Business mapping]),[Stage 1 DataLens Trade ID matched])

 

I hope this works!

 

Thanks!

Sapna Gupta
Barclaysusercds
8 - Asteroid

No it did not work. It did not pick up stage 1.

binuacs
21 - Polaris

@Barclaysusercds can you try this

IIF(IsEmpty([Stage 1 DataLens Trade ID matched]), IIF(IsEmpty([Stage 2 Business mapping]), [ Stage 3 Assumption based], [Stage 2 Business mapping]), [Stage 1 DataLens Trade ID matched])

  

Barclaysusercds
8 - Asteroid

No it did not work. It did not consider stage 2 or stage 3

binuacs
21 - Polaris

@Barclaysusercds Can you provide some sample data?

binuacs
21 - Polaris

@Barclaysusercds The formula I provided working fine for me. May be if you can provide some data we will check

 

binuacs_0-1652799218159.png

 

grazitti_sapna
17 - Castor

@Barclaysusercds  could you provide us some input and output required, as per my screenshot row 3 returned the value of the stage 1 result.

The other thing could be instead of empty the fields have null values. Give this a try

IIF(ISNULL([Stage 1 DataLens Trade ID matched]),IIF(ISNULL([Stage 2 Business mapping]),[Stage 3 Assumption based],[Stage 2 Business mapping]),[Stage 1 DataLens Trade ID matched])

 

Thanks!

Sapna Gupta
Barclaysusercds
8 - Asteroid

I am trying to upload an example but it's not allowing me to upload excel. It's taking a very long time.

Labels
Top Solution Authors