Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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
MVP
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
MVP
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