Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
Working with the following dataset:
Customer | Date | Qty |
A | 31/3/2019 | 0.9 |
A | 31/4/2019 | 0.4 |
A | 31/4/2019 | 0.5 |
A | 30/6/2019 | 0.2 |
B | 30/6/2018 | 0.6 |
B | 30/9/2018 | 0.6 |
B | 30/6/2019 | 0.6 |
We want to get following result:
Customer | Max Qty | Max Qty Date |
A | 0.9 | 31/4/2019 |
B | 0.6 | 30/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!
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..