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

FirstSortedValue using Aggr

Hi all,

We have following dataset...

dataset.png

... and we need to show diferent measures when user select a date:

  • Select Date Qty: SOLVED with..
    • Sum([Qty])
  • Last Date: SOLVED with..
    • FirstSortedValue({<Date=>} Date, Aggr(Sum({<Date=>} Floor(Today())-Floor(Date)), Date, Name))
  • Last Date Qty: NOT SOLVED..
  • Max Qty Date: SOLVED, but with problems cause in the example the Qty is the same in all dates and we want in this case show last date among valid dates.
    • FirstSortedValue({<Date=>} Date, -Aggr(Sum({<Date=>} [Qty]), Date, Name))
  • Max Qty Date Qty: SOLVED, but with the previous problem.
    • FirstSortedValue({<Date=>} Aggr(Sum({<Date=>} [Qty]), Date, Name), -Aggr(Sum({<Date=>} [Qty]), Date, Name))

The result with previous measures is the following:

datafiltered.png

.. and data should be displayed are:

Select Date Qty: 0,6

Last Date: 31/3/2019

Last Date Qty: 0,6

Max Qty Date: 31/3/2019

Max Qty Date Qty: 0,6

 

Does anyone know to solve the problem with measures? Thanks in advanced!

 

Labels (3)
0 Replies