Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Aggr max sales date with condition

I have table with sales, divided by sales points.

in first expression i calculate max date, where sales > 0

max({<[Quantity]={">0"}>}Date)

in second expression i calculate sales with date, where sales > 0

sum({<Data={"$(=max({<[Quantity]={'>0'}>}TOTAL <SPoint> Data))"} >}[Quantity])

but in the second expression filter {<Data={"$(=max({<[Quantity]={'>0'}>}TOTAL <SPoint> Data))"} >} is not aggregated by Spoints, it's the same for all of them.

The necessary result for me:

Sales for point 6 with 21.07.2014

Sales for point 8 with 21.07.2014

Sales for point 12 with 18.07.2014

See attached file.

Thank you!

13 Replies
Anonymous
Not applicable
Author

this expression get quantity for the same data (22.07.2014).....

in your expression condition with max data isn't connected with condition, where quantity must be > 0

lironbaram
Partner - Master III
Partner - Master III

hi

first of all , set analysis won't work for you ,

the reason is that set analysis always return the same value to all rows in the chart , because set analysis defines a selection in the data model  and as with all selections they effect all data the same

attach is an example using firstsortedvalue hope , it will help you

Anonymous
Not applicable
Author

It's working!

i'd been looking for correct answer for a long time.

Thank you!)

Anonymous
Not applicable
Author

i have one question for you.

it's working, when i show information by sales point.

but when i add to dimensions new dimensions (sales points include product type), values are not correct

in other words, i want to show quantity by product types, which are included to each sales points

Thank you!