5 Replies Latest reply: Mar 27, 2018 1:53 PM by Gabriele Cianci RSS

    Problem with FirstSortedValue()

    Gabriele Cianci

      Hi,

      I have a dataset like this

       

      YEAR     SALES

      2012          100

      2013          150

      2014          200

      2015          140

      2016          80

      2017          300

      2018          300

       

      If I use

       

      FirstSortedValue(YEAR, - SALES)

       

      Qlik visualize nothing because there are two year with a maximum of sales (2017 and 2018). In this case if I want choose 2018 or 2017 what I have to do?

      I need a script that I can use for other analysis then in my script I can't write 2017 or 2018 because in the next analysis the maximum sales can change.

       

      Thank you