Discussion Board for collaboration related to QlikView App Development.
I have a set of data with products, prices and dates of these prices.
I want to sum prices of all products, but only last available prices.
Could you help create a working expression for that?
The result here should be 23: 9 (for product A1) + 14 (for product A2) = 23.
=sum(aggr(if(max(TOTAL <PRODUCT> [DATE OF PRICE])=[DATE OF PRICE], sum(PRICE)), PRODUCT, [DATE OF PRICE]))
View solution in original post
you may resolve this with aggr and firstsortedvalue,
check the attached example,
I think you can use this:
FirstSortedValue (PRICE,-DATE_OF_PRICE) as LAST_PRICE,
The minus sign (before Date o f Price) is due to the fact that you want the "Last Value".
There is not a "LastSortedValue" function.