In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Getting a subset of data using several fields for criteria (Max Date)

ScottC_00
7 - Meteor

I have 30 or so fields of data.  The data represents audits done on a case.  Each case has a case number.  There are 2 kinds of audits Audit A and Audit B.  and each audit has an audit Date.  Each case may have zero, one or more than one audits for either Audit A or B or both.  Each audit has 8-12 questions, and each question is its own row.  So, each audit for each Case may have 8-12 rows with the same date.

 

I need to find the latest Audit A and the latest Audit B for each case number and keep those rows, dropping all other rows with earlier dates.  In the data attached, for case 123 I want to keep the Audit A rows that have a date of 4/15 and drop the rows for Audit A on 4/12 (keeping the MAX date).  For case 123 I want to keep the rows for Audit B that occurred on 5/20 since it’s the only one.

 

For Case 456 I want to keep the rows for Audit B that occurred on 7/21 and drop the ones from 5/10.  For case 456 there is no Audit A.

I tried doing this with a summary tool, but I want all the fields, including other fields not included in the aggregation or grouping.

I hope this makes sense.

Thanks

2 REPLIES 2
gautiergodard
13 - Pulsar

Hey @ScottC_00 

Please find solution attached using the a summary and join tool combination!

gautiergodard_0-1668102497673.png

 

Hope this helps!

ScottC_00
7 - Meteor

Thanks gautiergodard.  Works perfectly. 

Labels
Top Solution Authors