Skip to main content
Announcements
Have questions about Qlik Connect? Join us live on April 10th, at 11 AM ET: SIGN UP NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

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
Gysbert_Wassenaar

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


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

It's working!

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

Yousef_Amarneh
Partner - Creator III
Partner - Creator III

try this please

Yousef Amarneh
Anonymous
Not applicable
Author

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!

Anonymous
Not applicable
Author

34 instead 32

sorry

Gysbert_Wassenaar

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


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

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_Amarneh
Partner - Creator III
Partner - Creator III

please see this.

Yousef Amarneh
Anonymous
Not applicable
Author

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