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: 
rubenares
Partner - Contributor
Partner - Contributor

Set Analysis max qty date

 

Working with the following dataset:

CustomerDateQty
A31/3/20190.9
A31/4/20190.4
A31/4/20190.5
A30/6/20190.2
B30/6/20180.6
B30/9/20180.6
B30/6/20190.6

 

We want to get following result:

CustomerMax QtyMax Qty Date
A0.931/4/2019
B0.630/6/2019

 

We are trying with following code:

Max Qty = 

FirstSortedValue({<Date =>} Aggr(Sum({<Date =>} [Qty ]), Date ), -Aggr(Sum({<Date =>} [Qty ]), Date ))

Max Qty Date =

FirstSortedValue({<Date =>} Date , -Aggr(Sum({<Date =>} [Qty ]), Date ))

 

But we have problems with Max Qty Date measure because in case the max qty coincides on different dates, we want to show max of those dates.

Aditionally, these measures should ignore date selection.

 

Thanks in advance!

1 Reply
tresesco
MVP
MVP

Hi,

It becomes easier for all to follow one thread. Please continue here : https://community.qlik.com/t5/Qlik-Sense-App-Development/Set-Analysis-sum-max-date-qty/m-p/1650001/h... with proper feedback/like or asking for clarification..