Alteryx Designer Desktop Discussions

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

Need group by and difference

mmustkee
9 - Comet

Hi Team,

 

I have some common name and some different dates against those name. So I want to group by names and want to know the difference from Max date to Min date of the dates "in days" for each names. Please find example below

 

Name    Date                     Result

NNn      07/Jul/ 2023         129

nnn       06/Mar/2023         129

NNN     28/Feb/2023         129

NnN     05/Jul/ 2023          129

 

So here Max date is 07/Jul/2023 and Min date is 28/Feb/2023 so the difference should be 129 days

 

Appreciate your quick response.

3 REPLIES 3
ed_hayter
12 - Quasar

Seperate paths to parse different date structure. Summarize to find min and max for each name then formula to calculate the difference

 

Edit: Alternatively could parse the different dates in a formula tool with conditional logic

 

image.png

mmustkee
9 - Comet

Hi @ed_hayter 

 

Thanks for your response.

 

If you see below name which is coming for times but case is upper or lower but the name is the same.

An7/25/2023
an7/25/2023
AN7/5/2023
aN7/5/2023

 

We should have difference of 20 here but result shows '0' also please make sure that original values should not be lost. We should have difference for each row. for above all four names should have difference of 20.

 

Thanks for your help.

ed_hayter
12 - Quasar

So I made a new column with the names standardized for grouping then joined back to the original keeping the original names and adding the date diff on to each row.

 

image.png

Labels