Let’s talk Alteryx Copilot. Join the live AMA event to connect with the Alteryx team, ask questions, and hear how others are exploring what Copilot can do. Have Copilot questions? Ask here!
Start Free Trial

Alteryx Designer Desktop Discussions

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

Help with picking max. qtr. for a max. year

MROGK
8 - Asteroid

Can someone help me how to arrive at max. quarter for a max. year. In the below table, would like to arrive at Year 2022, Qtr. 1. When I use the summarize (using group by max. year & max. qtr.), I get both 2021 Q4 & 2022 Q. Thankyou.

 

TeamProd DateQtr.Year
AKC12/1/202142,021
AKC12/2/202142,021
AKC12/3/202142,021
AKC12/4/202142,021
AKC12/5/202142,021
AKC12/1/202142,020
AKC12/2/202142,020
AKC12/3/202142,020
AKC12/4/202142,020
AKC12/5/202142,020
AKC1/1/202212,022
AKC1/2/202212,022
AKC1/3/202212,022
AKC1/4/202212,022
AKC1/5/202212,022
5 REPLIES 5
apathetichell
20 - Arcturus

you need to take max of prod date when prod date is a date - then convert that into a year/quarter after.

 

See attached for an example of how you'd do this. Note - there is some fanciness in the dynamic quarter conversion. It's a bit less intuitive.

MROGK
8 - Asteroid

Just to clarify, looking for the output

 

TeamQtr.Year
AKC12,022
apathetichell
20 - Arcturus

post join tool.pngso you want Team as well? You didn't ask for it. Take you datastream after the date/time tool and join it to the stream coming out of the formula tool. Join on the datetimeout and the max date field. The join anchor will be any entries matching the max date.

Qiu
21 - Polaris
21 - Polaris

@MROGK 
I try to avoid the DateTime formula.

0104-MROGK-A.PNG0104-MROGK-B.PNG

atcodedog05
22 - Nova
22 - Nova

Hi @MROGK 

 

You don't need to convert the date or use the formula tool at all you can just sort by year (descending) sort by qtr (descending) and only keep the first row.

 

atcodedog05_0-1641279936531.png

 

 

Hope this helps : )

Labels
Top Solution Authors