Skip to main content
Announcements
NEW: Seamless Public Data Sharing with Qlik's New Anonymous Access Capability: TELL ME MORE!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

need to show the latest sales data for each id

Dateidsales
14-08-2012a10
15-08-2012a11
16-08-2012a12
16-08-2012b13
17-08-2012b13
18-08-2012b14
19-08-2012b15

for the above data, i need to show the id and latest sales of the id , ie.i should get the below result

idsales
a12
b15

Could anyone help me ..

Thanks,

Sankar

1 Solution

Accepted Solutions
swuehl
MVP
MVP

In your table chart with dimension id, try using this expression

=FirstSortedValue( sales, -Date)

with sales and Date being your field names for above columns.

Hope this helps,

Stefan

View solution in original post

4 Replies
swuehl
MVP
MVP

In your table chart with dimension id, try using this expression

=FirstSortedValue( sales, -Date)

with sales and Date being your field names for above columns.

Hope this helps,

Stefan

MayilVahanan

Hi

Try like this

Firstsortedvalue(sales,-date,1)

Hope it hels

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.
jeffmartins
Partner - Creator II
Partner - Creator II

Hi sankar_thia,

If you are trying to do it in the script you can use max function and an inner join to get the latest sales.

See the attached file, hope it helps you.

Regards

Not applicable
Author

i got the result using 'FirstSortedValue( sales, -Date)'.

thanks all for your help