Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Date Calculation

chiragpatel_1
8 - Asteroid

In the attached file,  the 'months into scheme column' is calculated using the below formula which works but the dilemma is that when the 'date to' is in future from now, the calculation works fine but when 'date to' is in the past, it falls over. 'Expected output should be' column is what I'm expecting the calculation should be, second row is perfect example where the issue is.

 

what do i add to the below formula to fix that issue?

 

chiragpatel_1_0-1645628014496.png

 

5 REPLIES 5
TheOC
15 - Aurora
15 - Aurora

hi @chiragpatel_1 

I believe i have fixed your problem. I changed your formula to an if statement - stating that if the 'date to' date is before today, use that date as the comparison, otherwise use todays date:

TheOC_0-1645629127711.png



I've attached the workflow, my formula is as 'months date2'.

Hope this helps,
TheOC


Bulien
mattnason1
9 - Comet

I did 3 formulas and it seems to work:

 

mattnason1_0-1645629187653.png

 

atcodedog05
22 - Nova
22 - Nova

Glad to hear this got resolved 🙂 sorry I couldn't help you out with the recent request link  @chiragpatel_1 

 

Kudos to @TheOC on solving this 😀👍

chiragpatel_1
8 - Asteroid

Thank you, for quick reply @TheOC 

 

@atcodedog05 no worries, with your original formula you got me half way there though.

TheOC
15 - Aurora
15 - Aurora

no problem @chiragpatel_1 ! Happy to help!

Cheers for the Kudos @atcodedog05 😀👍🏻


Bulien
Labels