Skip to main content
Announcements
Accelerate Your Success: Fuel your data and AI journey with the right services, delivered by our experts. Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
v_jaideep
Creator
Creator

Max Date

Hi,

I'm looking to get max date from below dataset based on Category and Country. For some reasons I'm getting it as blank(-) when I group by or even just use max(Date). Any other inputs.

 

CountryDateCategory
USA6/3/2021A
USA4/21/2021A
USA1/1/2021A
UK5/20/2021B
UK4/22/2020B
1 Solution

Accepted Solutions
v_jaideep
Creator
Creator
Author

Date(Floor(Date#(Trim(Date), 'YYYY-MM-DD')), 'MM/DD/YYYY') has worked

View solution in original post

4 Replies
rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Can you post the script you tried?

-Rob

v_jaideep
Creator
Creator
Author

Load product_id,DATE(max(Date),'DD-MM-YYYY') as max_date,Category
Resident PRICE
group by product_id,Category;

rwunderlich
Partner Ambassador/MVP
Partner Ambassador/MVP

Your script looks ok. Are you sure your Date values are numeric?

-Rob

v_jaideep
Creator
Creator
Author

Date(Floor(Date#(Trim(Date), 'YYYY-MM-DD')), 'MM/DD/YYYY') has worked