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: 
saminouari
Contributor III
Contributor III

Get last value max date

Hi, 

I want to get the last value from the latest date, for example : 

This is my table

Store,Date, Value
BOULANGER AGEN, 03/06/2019, 1
BOULANGER AGEN, 13/06/2019, 1
BOULANGER AGEN, 26/06/2019, 1
BOULANGER AGEN, 26/06/2019, 0
BOULANGER AGEN, 17/07/2019, 0
BOULANGER AGEN, 17/07/2019, 2
BOULANGER AGEN, 30/07/2019, 1

This is the result I want

Store, Max Date, Last Value
BOULANGER AGEN, 30/07/2019, 1

 

I tried FirstSortedValue but it didn't work.

2 Solutions

Accepted Solutions
sunny_talwar
MVP
MVP

Front end solution

image.png

View solution in original post

sunny_talwar
MVP
MVP

Max(Date) is an expression, not a dimension... you seem to be using it as a dimension

View solution in original post

5 Replies
sunny_talwar
MVP
MVP

In the script or front end

saminouari
Contributor III
Contributor III
Author

@sunny_talwar  Both solutions work for me, I want to display the last value from max date of each distinct store.

sunny_talwar
MVP
MVP

Front end solution

image.png

saminouari
Contributor III
Contributor III
Author

@sunny_talwar  Your solution work fine, but when I tried to replicate it, it didn't work. I think I have a problem with the DateFormat.

 

clipboard_image_0.png

clipboard_image_1.png

sunny_talwar
MVP
MVP

Max(Date) is an expression, not a dimension... you seem to be using it as a dimension