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: 
Arun_Starz
Contributor
Contributor

Max Date and Max Value

Hiii Guys,

 

i want the latest date and latest value of each column.

Thanks in Advance

Arun_Starz_0-1643696327946.png

 

1 Solution

Accepted Solutions
nevopotokcloudinary
Creator
Creator

Load * Inline [
OrderID,Status,Date
1, 0, 01/06/2022 22:01
1, 1, 01/06/2022 23:01
1, 2, 01/06/2022 23:02
2, 0, 01/07/2022 0:01
2, 1, 01/23/2022 5:00
2, 1, 01/07/2022 9:00
3, 0, 01/07/2022 0:01
3, 1, 01/07/2022 0:02
4, 0, 01/07/2022 1:01
4, 1, 01/07/2022 1:03
];

 

FirstSortedValue(Status,-Num(Date#(Date,'MM/DD/YYYY hh:mm')))

 

 

nevopotokcloudinary_0-1643699681116.png

 

View solution in original post

3 Replies
nevopotokcloudinary
Creator
Creator

You can use firstsortedvalue function (eg. for Product column Firstsortedvalue(Product,-Date) )

nevopotokcloudinary
Creator
Creator

Load * Inline [
OrderID,Status,Date
1, 0, 01/06/2022 22:01
1, 1, 01/06/2022 23:01
1, 2, 01/06/2022 23:02
2, 0, 01/07/2022 0:01
2, 1, 01/23/2022 5:00
2, 1, 01/07/2022 9:00
3, 0, 01/07/2022 0:01
3, 1, 01/07/2022 0:02
4, 0, 01/07/2022 1:01
4, 1, 01/07/2022 1:03
];

 

FirstSortedValue(Status,-Num(Date#(Date,'MM/DD/YYYY hh:mm')))

 

 

nevopotokcloudinary_0-1643699681116.png

 

Arun_Starz
Contributor
Contributor
Author

Thanks it worked 😊