General Discussions

Discuss any topics that are not product-specific here.
SOLVED

If Then Formula

Brown17
5 - Atom

I have an If Then Formula that is working as expected in Excel however when it is translated into Alteryx it returns a 0.  I confirmed the formulas match so I'm not sure why Alteryx isn't calculating as expected? Essentially it's "if tonumber([End Date])- tonumber([User.Current Period End Date])-365 > 0 then tonumber([End Date])- tonumber([User.Current Period End Date])-365 else 0 endif"

3 REPLIES 3
AkimasaKajitani
17 - Castor
17 - Castor

Hi @Brown17 ,

 

Is the [End Date] Field Date Type or Int Type?

If the [End Date] Field is Date Type, the ToNumber function does not return the correct elapsed days.

Please use the DateTimeDiff function to get the elapsed days from the two days 

Qiu
21 - Polaris
21 - Polaris

@Brown17 
As @AkimasaKajitani suggested, we have to follow the way of Alteryx for calculating Datetime.

below is a quick sample.

0212-Brown17.PNG

Brown17
5 - Atom

Thank you!

Labels