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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Reduce table output based on latest Purchasing date

Hi all,
I'm having problems getting our app to work based on the following requirement:
- from a table with several output records per material, get only one record per material based on its max Purchasing Date.
For example, based on the following entry data:
CenterMaterial IDMaterial TypePurchasing DateClass
A001Mat01TA01/01/20121
A001Mat01TA26/02/20121
A001Mat02TB10/01/20121
A002Mat01TA30/01/20121
A002Mat03TC23/04/20121
A002Mat03TC30/04/20122
we would like to have a single output record per Center/Material, taking as result value the one with latest Purchasing Date in case of several entry records:
Desired Output:
A001Mat01TA26/02/20121
A001Mat02TB10/01/20121
A002Mat01TA30/01/20121
A002Mat03TC30/04/20122
Thanks in advance for your help,
Best regards,
Enric
1 Solution

Accepted Solutions
Miguel_Angel_Baeyens

Hi Enric,

If you create a chart with Center, Material ID, Material Type and Purchasing Date as dimensions, the expression should be like

FirstSortedValue(Class, -[Purchasing Date])

Hope that helps.

Miguel

View solution in original post

2 Replies
Miguel_Angel_Baeyens

Hi Enric,

If you create a chart with Center, Material ID, Material Type and Purchasing Date as dimensions, the expression should be like

FirstSortedValue(Class, -[Purchasing Date])

Hope that helps.

Miguel

Not applicable
Author

Thanks, Miguel,

That was exactly what I was looking for.

Best regards!

Enric