Alert: There is a planned Community maintenance outage October 16th from approximately 10 - 11 PM PST. During this time the Alteryx Community will be inaccessible. Thank you for your understanding!

Alteryx Designer Desktop Discussions

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

Formula: Ontime/late

Gaetano_B
8 - Asteroid

Hi All, Happy Friday.

 

I'm trying to create a column (Completion Delta) which shows me whether a milestone was 'On Time' or 'Late' based on a date, as per example below.

 

Any Suggestions?

 

Target Completion DateActual Completion DateCompletion Delta
18/10/202019/10/2020Late
18/10/202018/10/2020On Time
18/10/202017/10/2020On Time

 

5 REPLIES 5
Emil_Kos
17 - Castor
17 - Castor

@Gaetano_B,

 

I have created a workflow for you:

 

Emil_Kos_1-1603446452750.png

 

The output:

 

Emil_Kos_0-1603446444625.png

 

Please mark it as a solution if this is something helpful!

 

Good luck!

RolandSchubert
16 - Nebula
16 - Nebula

Hi @Gaetano_B ,

 

a formula using DateTime functions should do it:

 

IF DateTimeDiff(DateTimeParse([Target Completion Date], '%d/%m/%Y'), DateTimeParse([Actual Completion Date], '%d/%m/%Y'), 'days') >= 0 THEN
'On Time'
ELSE
'Late'
ENDIF

 

I've attached a sample workflow. Let me know if it works for you.

 

Best,

 

Roland

Gaetano_B
8 - Asteroid

Thanks @Emil_Kos  that works perfectly. Is there anyways we could add to the formula that if the actual completion date is blank then the completion delta should be blank?

 

I'll mark your post as a solution! Thanks again.

Emil_Kos
17 - Castor
17 - Castor

Hi @Gaetano_B,


Sure that it is possible.


Please find solution attached.

 

Emil_Kos_0-1603451633614.png

 

Emil_Kos
17 - Castor
17 - Castor

Hi @Gaetano_B,

 

Thank you for marking my answer as a solution.

 

Good luck!

Labels