Qlik Community

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 
Search instead for 
Did you mean: 
Highlighted
Contributor III
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 "-".

Please help me to solve this issue. 

Vendor_id

DatePrice

V1

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

the maximum

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

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
Champion III

Please close the thread if you got the correct answer

Highlighted
Contributor III
Contributor III

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

Screenshot (3).png

And I got the right:

     Capture.PNG

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

No it's not working

Screenshot (4).pngScreenshot (5).png

Highlighted
Specialist III
Specialist III

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

Highlighted
Contributor III
Contributor III

Screenshot (9).pngScreenshot (8).png

Highlighted

Hi, can you try?:

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