# New to QlikView

Discussion board where members can get started with QlikView.

Announcements
Modernize Your QlikView Deployment webinar, Nov. 3rd. REGISTER
cancel
Showing results for
Did you mean:
Highlighted
Contributor III

## Want to find the price of latest date or recent date

Hello Guys,

I want to make a bar graph that shows the price of vendors on the latest date.

this is the given sample to try. I tried firstsortedvalue function but it only shows valut of only V1 all others vendors are showing "-".

Vendor_id

DatePrice

V1

20140601155
V120151001158.56
V12018010193
V220100501171.43
V320110718121
V22017050155
V120110718118
10 Replies
Highlighted
Champion III

the maximum

1. Sum(Aggr(FirstSortedValue(Price, -Date), Vendor_id))
Highlighted
MVP

Hi Subham, firstsortedvalue() should work, unles a vendor has many different values for the first or last date.

Last value: FirstSortedValue(Price, -Date)

First value: FirstSortedValue(Price, Date)

Highlighted
Champion III

Highlighted
Contributor III

Thank you very much, IT works perfectly. but there is one problem too. This is my Table

And I got the right:

But the problem is I want to make a KPI and want to make some operations with that number "62.61"  (The sum of all the price of all the  Part_id of that vendor) I want it to multiply Quantity(Qty) with that 62.61 and show it in a KPI.

Highlighted
Specialist III

HI,

Try below expression

=Sum(Aggr(Sum({<Date=

{\$(=concat(chr(39)&aggr(distincmax(num(Date)),Vendor_id)&chr(39),','))}>}Price),Vendor_id))

Thanks,

Highlighted
Contributor III

No it's not working

Highlighted
Specialist III

Check the expression once there is a space between Distinct  & max

Highlighted
Contributor III

Highlighted
MVP

Hi, can you try?:

Sum(Aggr(FirstSortedValue(Price, -Date), V_id, Part_id))*Sum(Qty)