Alteryx Designer Desktop Discussions

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

Filter data to get most recent date based on filter to multiple columns

KamalChoudhary_in
7 - Meteor

Hi All,

I want to get the LastUpdate based on the Location , Currency, UPPER/LOWER ,when we filter London , and select upper and lower take most recent date, any suggestion is much  appreciated.

 

Input Data

LocationCurrencyUPPER/LOWERNameLastUpdate
LondonGBPUPPERKen12/12/2016 8:34
LondonGBPLOWERJIM12/12/2016 8:31
LondonGBPUPPERKen12/10/2016 8:34
LondonGBPLOWERJIM12/10/2016 8:31
USAUSDLOWERNick12/11/2016 8:31
USAUSDUPPERPete12/11/2016 9:31
USAUSDUPPERPete11/10/2016 9:31
FRNEURLOWERBarb12/12/2016 10:12
ChinaHKDUPPERJon12/30/2016 23:45
ChinaHKDLOWERJon12/30/2016 23:45
ChinaHKDUPPERJon12/31/2016 23:45
ChinaHKDLOWERJon12/31/2016 23:45
IndiaINRUPPERCarl1/2/2017 14:23

 

 

Output Data 

LocationCurrencyUPPER/LOWERNameLastUpdate
LondonGBPUPPERKen12/12/2016 8:34
LondonGBPLOWERJIM12/12/2016 8:31
USAUSDLOWERNick12/11/2016 8:31
USAUSDUPPERPete12/11/2016 9:31
FRNEURLOWERBarb12/12/2016 10:12
ChinaHKDUPPERJon12/31/2016 23:45
ChinaHKDLOWERJon12/31/2016 23:45
IndiaINRUPPERCarl1/2/2017 14:23
7 REPLIES 7
StellaBon
11 - Bolide

@KamalChoudhary_in Use a Summarize tool and group by Location, Currency, U/L. This eliminates duplicates. Then in the same tool add LastUpdate but instead of "grouping by" you select Max to get the most recent date. Hope this helps. EDIT: Join back to main dataset if you need additional columns. Let me know how this goes!

KamalChoudhary_in
7 - Meteor

Hi Stella,

 

Thank you very much for response , what if we need to find latest date for each month based on previous requirement  in last update column 

 

Input Dat 

LocationCurrencyUPPER/LOWERNameLastUpdate
LondonGBPUPPERKen12/12/2016 8:34
LondonGBPLOWERJIM12/12/2016 8:31
LondonGBPUPPERKen11/12/2016 8:34
LondonGBPLOWERJIM11/12/2016 8:31
LondonGBPUPPERKen12/10/2016 8:34
LondonGBPLOWERJIM12/10/2016 8:31
USAUSDLOWERNick12/11/2016 8:31
USAUSDUPPERPete12/11/2016 9:31
USAUSDUPPERPete11/10/2016 9:31
FRNEURLOWERBarb12/12/2016 10:12
ChinaHKDUPPERJon12/30/2016 23:45
ChinaHKDLOWERJon12/30/2016 23:45
ChinaHKDUPPERJon12/31/2016 23:45
ChinaHKDLOWERJon12/31/2016 23:45
IndiaINRUPPERCarl1/2/2017 14:23

 

Output data 

LocationCurrencyUPPER/LOWERNameLastUpdate
LondonGBPUPPERKen12/12/2016 8:34
LondonGBPLOWERJIM12/12/2016 8:31
LondonGBPUPPERKen11/12/2016 8:34
LondonGBPLOWERJIM11/12/2016 8:31
USAUSDLOWERNick12/11/2016 8:31
USAUSDUPPERPete12/11/2016 9:31
FRNEURLOWERBarb12/12/2016 10:12
ChinaHKDUPPERJon12/31/2016 23:45
ChinaHKDLOWERJon12/31/2016 23:45
IndiaINRUPPERCarl1/2/2017 14:23

 

StellaBon
11 - Bolide

@KamalChoudhary_in You use a formula tool, and the DateTimeMonth() and DateTimeYear() functions to create  month and year columns, which allows you to "group by" year and month, and get the "Max" entry for each month. Play around with it! Let me know how it goes. If this has helped please mark as "Solved". 

KamalChoudhary_in
7 - Meteor

I have parsed month column and added to summarize tool as group by it worked , Kindly correct me if my approach is wrong 

StellaBon
11 - Bolide

@KamalChoudhary_in Great! If you're happy with the outcome, then it worked. Glad to help. 😊

NMangera
10 - Fireball

@KamalChoudhary_in ,

 

the workflow would look something like...

 

Filter data to get most recent date based on filter to multiple columns.png

KamalChoudhary_in
7 - Meteor

Thanks for helping out @StellaBon 

Labels