Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Days Open and Aging from Excel to Alteryx Help

geeklarokcmie
8 - Asteroid

Hello Alteryx Experts,

 

I need assistance on creating a formula or a flow in Alteryx that currently works in excel.

 

From the below table :

 

1) Using the Created Date & Current Month date– I run the below formula under the Days Open Column to produce the number of days since the issue was created.

 

=DATEDIF(A2,B2,"d")

 

2) Using the Days Open data columns– I run the below formula under the Aging Colum to list the days into timeframes.

 

=IF(A2<=30,"1-30 Days",

IF(A2<=60,"31-60 Days",

IF(A2<=90,"61-90 Days",

IF(A2>90,"Exceeds 90 Days",

"ERROR"))))

 

 

A

B

C

D

1

Created Date

Current Month

Days Open

Aging

2

4/9/2015 4:00

08/01/2023

3036

Exceeds 90 Days

3

5/27/2015 4:00

08/01/2023

2988

Exceeds 90 Days

4

3/22/2016 18:56

08/01/2023

2688

Exceeds 90 Days

5

3/31/2016 21:10

08/01/2023

2679

Exceeds 90 Days

6

4/4/2016 4:12

08/01/2023

2675

Exceeds 90 Days

7

5/31/2016 18:30

08/01/2023

2618

Exceeds 90 Days

7 REPLIES 7
binuacs
21 - Polaris

@geeklarokcmie One way of doing this

image.png

rzdodson
12 - Quasar

@geeklarokcmie assuming that you want the Current Month to be dynamic, here is one solution for you.

 

Solution.png

geeklarokcmie
8 - Asteroid

Thank you for the prompt response. For some reason you are formula is erroring out.

 

Find the attached screenshot

 

 

binuacs
21 - Polaris

@geeklarokcmie If your date fields are in DateTime DataType then use the below formula

image.png

geeklarokcmie
8 - Asteroid

@binuacs & @rzdodson : Appreciate your responses. 

 

when I tried the formula you have provided : the days open column data is incorrect. 

 

(As you can see from the below example : Days Open is Excel based and it populates 3036 while Days_OPen displays 3035. Why is that? 

 

Capture.JPG

rzdodson
12 - Quasar

@geeklarokcmie it is because of how DateTimeDiff handles the Current Month string. From my understanding, since the subtraction results in a partial day, Alteryx's DateTimeDiff in this case will force the Days Open down to the nearest integer (think Floor function in Alteryx).

binuacs
21 - Polaris

@geeklarokcmie add 1 to the daysdiff formula

image.png

Labels
Top Solution Authors