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

Announcements
Join us in Bucharest on Sept 18th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
sal07
Contributor II
Contributor II

Help with max and min date!

Hi everyone,

Iam new here in this community, i want help to separate two values deepens on max and min date.

the expression for max date: (if the date is max then count id)

=count(distinct(if(max(date), id)   

the expression for min date: (if the date is min then count id)

=count(distinct(if(min(date), id)   

Thnx for help

4 Replies
Kushal_Chawda

=count({<Date={"$(=Date(max(Date)))"}>}ID)  -> For Max

=count({<Date={"$(=Date(min(Date)))"}>}ID)  -> from Min

sal07
Contributor II
Contributor II
Author

Thank you Kushal , but the code dosn't work !

Anil_Babu_Samineni

May be the reason date format? What is the date format from your Model

=count({<Date={"$(=Date(max(Date),'YourFormatHere'))"}>}ID)  -> For Max

=count({<Date={"$(=Date(min(Date),'YourFormatHere'))"}>}ID)  -> from Min

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
ankur_abhishek
Contributor III
Contributor III

=count({<Date={"$(=Date(max(Date),'DD/MM/YYYY'))"}>}ID)  -> For Max

=count({<Date={"$(=Date(min(Date),'DD/MM/YYYY'))"}>}ID)  -> from Min