Qlik Community

New to QlikView

Discussion board where members can get started with QlikView.

Highlighted
Partner
Partner

Get the last one in stock

Hi Exper

I have a stock values and i want to get the last value of stock, for every date,Prod and Place

i have a lot of values for each date, product and place, and i want to show only the last one(for this combination)

i want to create a table with this information

attached the excel

thanks a lot

1 Solution

Accepted Solutions
devarasu07
Honored Contributor II

Re: Get the last one in stock

Hi,

like attached?

=FirstSortedValue(Date,-RowNo)

Capture.JPG

4 Replies

Re: Get the last one in stock

May be this

Sum(Aggr(If(Date + Time = Max(TOTAL <Prod, Place, Date> Aggr(Date + Time, Prod, Place, Date, Time)), Sum(Stock)), Prod, Place, Date, Time))

devarasu07
Honored Contributor II

Re: Get the last one in stock

Hi,

like attached?

=FirstSortedValue(Date,-RowNo)

Capture.JPG

effinty2112
Honored Contributor

Re: Get the last one in stock

Hi Fernando,

Maybe:

Date Prod Place Aggr(if(Rank(Time)= 1, Stock),Date,Prod,Place,Time)
16/05/20171178618193485
30/05/20171178618193485

Cheers

Andrew

antoniotiman
Honored Contributor III

Re: Get the last one in stock

Hi Fernando,

maybe this

Note : In Script LOAD

...,Time(Time) as Time,...

Regards,

Antonio