Alteryx Designer Desktop Discussions

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

Need help recreating excel formula in alteryx

Alexhr74
6 - Meteoroid

Hi all I'm having trouble recreating this excel formula in alteryx 

 

1) K5 represents a date with 180 days added 

2) L5 represents a date with 270 days added 

3) I5 Represents Gross amount 

 

=-IF(AND(K5>=DATE(2020,11,10),K5<=DATE(2020,11,30)),(I5/2),IF(AND(L5>=DATE(2020,11,10),L5<=DATE(2020,11,30)),(I5/2),0))

 

My problem is i'm trying to get an anticipated provision where at 180 days the gross amount will be half its total and at 270 days the gross amount will be at full provision. 

 

As you can see my formula is malformed. 

4 REPLIES 4
PhilipMannering
16 - Nebula
16 - Nebula

I think you're on your way. You just need to finish it off with and ELSE statement.

Try, for the time being, just adding

ELSE Null() ENDIF

To your formula. 

Alexhr74
6 - Meteoroid

and when I do that i get the "Type Mismatch in operator +"

PhilipMannering
16 - Nebula
16 - Nebula

You have DateTimeFirstofMonth() + 10. You can't add days a date field like this (unfortunately).

Instead use,

 

DateTimeAdd(DateTimeFirstofMonth(), 10, 'days')

 

 

See if that works. 

Alexhr74
6 - Meteoroid

That worked Thanks 

Labels