Free Trial

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

struggling to construct a calculation.

 

I want a calculation where number of months are calculated using field [Date from] (already in altreyx iso format) from Todays date and then I want to take away two months.

 

What would the calculation look like?

 

Many Thanks.

10 REPLIES 10
atcodedog05
22 - Nova
22 - Nova

Hi @chiragpatel_1 

 

Here is how you can do it.

Workflow:

atcodedog05_0-1645460576846.png

 

Hope this helps : )

 

chiragpatel_1
8 - Asteroid

Did post then figured why, so thank you for above, it has worked

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @chiragpatel_1 

Cheers and have a nice day!

chiragpatel_1
8 - Asteroid

Turns out I didn't figure it although your solution was right.

 

Ive been boggled by the below.

 

Note- 'Date calc' column is month difference between 'date to' and 'date from'.

chiragpatel_1_0-1645549811621.png

 

 

Months into scheme is computed using the formula you recommended which is right but what I want the calculation to do is for example for first account Q14009, the scheme has progressed for 10 months which is from April until Jan, Feb hasn't ended so we don't count that yet, that so happens to be right coincidentally but for other accounts it's not right. The second acount 'months into scheme' should be '12' not 13..

 

I just can't figure out how to accommodate the 'date to' column in the calculation you suggested.

 

chiragpatel_1
8 - Asteroid

Can this post be seen once a solution has been accepted?

atcodedog05
22 - Nova
22 - Nova

Hi @chiragpatel_1 

 

It is suggested to post new question so that others also look into it. Other solution authors usually wont look into the solved ones.


Can you provide some sample input and expected output in a file It will help us get a better understanding of the usecase.

We will be happy to help : )

 

chiragpatel_1
8 - Asteroid

please see below I have done some explanation, hopefully this should give you the idea.

 

when the 'date to' is in future form now, the calculation work fine but when 'date to' is in the past it falls over , see second row

 

chiragpatel_1_0-1645619894473.png

 

atcodedog05
22 - Nova
22 - Nova

Hi @chiragpatel_1 

 

Please provide the excel file as an attachment its hard to work without it.

 

Happy to help : )

chiragpatel_1
8 - Asteroid

Apologies, many thanks

Labels
Top Solution Authors