Qlik Community

QlikView Creating Analytics

Discussion Board for collaboration related to Creating Analytics for QlikView.

andreyfcdk91
New Contributor III

sales with latest date

Good day.

My problem:

There is pivot table "Quantity with latest date" in attached model

In expression i calculate max date for each sales point, where total quantity >0

In second expression i want to show quantity with date, got in first expression.

Thank you!

13 Replies

Re: sales with latest date

Try FirstSortedValue({<Quantity = {">0"}>}TOTAL <Spoint> Quantity,-Date)


talk is cheap, supply exceeds demand
andreyfcdk91
New Contributor III

Re: Re: sales with latest date

It's working!

but quantity is not aggregated by types. I see the same value for all types.

yousef_am
Contributor II

Re: Re: Re: sales with latest date

try this please

andreyfcdk91
New Contributor III

Re: Re: sales with latest date

thank you!

max date is calculated correctly.

But for Quantity:

for example:

for Point 3 max sales date is 23.12.2014 - but quantity isn't correct: 32 is for 23.12.2014, 33 is for 23.09.2014

for Spoint 3 for all types date must be 23.12.2014 (max sales date)

and such condition for other points

Thank you!

andreyfcdk91
New Contributor III

Re: Re: sales with latest date

34 instead 32

sorry

Re: Re: sales with latest date

Try =sum(aggr(FirstSortedValue({<Quantity = {">0"}>}Quantity,-Date),ProductType,Spoint))


talk is cheap, supply exceeds demand
andreyfcdk91
New Contributor III

Re: sales with latest date

for this expression quantity isn't correct...

for example: Point 3: there must be only value for type 1  :33, for type 3 there mus not be any value, because date for it is 23.09.2014 (not max date)

yousef_am
Contributor II

Re: Re: sales with latest date

please see this.

andreyfcdk91
New Contributor III

Re: sales with latest date

Let see point 3:

23.12.2014 : 34

23.09.2014 : 33

I need quantity only for max date (for point 3  - 23.12.2014 )

if for some type there are not any quantity with max date, there must be null value

Thank you

Community Browser