We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Date Time Function - Prioritization Depending on its Due Date

Franzil
8 - Asteroid

Good day,

 

I hope you find this message well. I am hoping to get some of your help to finally finish my workflow. I am working with the due dates and will give each prioritization depends on its date (Due Date) and marked as '1' '2' and '3'. if the due date is 1 day from as of date then it will marked as '3' then 2 days from as of date would be '2', so on and so forth. Below is the final output that I want to be achieve.

 

Assigned Date     Due Date     Prioritization
4/17/2025           4/17/2025             3
4/17/2025           4/16/2025             3
4/17/2025           4/15/2025             2
4/17/2025           4/14/2025             1
4/17/2025           4/13/2025             1
4/17/2025           4/12/2025             1
4/17/2025           4/11/2025             1
4/17/2025      4/10/2025 1

 

Hope someone will help me re on this problem, best and regards.

 

Franz

6 REPLIES 6
davidskaife
14 - Magnetar

Hi @Franzil 

 

DateTimeDiff formula will work, wrapped up in an IF..ELSEIF statement, please see screenshot below:

 

Screenshot 2025-04-17 102300.png

 

I've had to use DateTime tool to parse your dates into a usable format for Alteryx to work with.

 

Workflow attached!

Franzil
8 - Asteroid

Good Day @davidskaife ,

 

This solution has proven to be effective, enabling me to successfully pass the review process. I am sincerely grateful for your assistance and deeply appreciate your support. 

 

Thank you so much and God speed!

davidskaife
14 - Magnetar

@Franzil  You're very welcome, just so you know you've accepted your reply as the solution though

Franzil
8 - Asteroid

@davidskaife Yeah I accepted it as solution review, thank you :)

Franzil
8 - Asteroid

@davidskaife  Apologies, David, but I needed to revisit the matter. I forgot to specify the exclusion of non-working days, particularly Sunday and Saturday. For instance, if I have a due date of 04/18/2025, which falls on a Friday, the following days are Sunday and Saturday. In this example workflow, it would automatically be classified as priority 1. However, it should actually be priority 3, considering my assigned date is today's date, 04/21/2025, excluding Sunday and Saturday, resulting in only 1 working day.

 

davidskaife
14 - Magnetar

If you have a look on the Community there are plenty of results for excluding non-work days. For example you could use this to exclude weekends - https://community.alteryx.com/t5/Alteryx-Designer-Desktop-Discussions/Easiest-way-to-do-datetimediff...

Labels
Top Solution Authors