7 Replies Latest reply: Jul 16, 2018 7:26 AM by Sunny Talwar RSS

    Most occuring product

    Deepak K M

      Screenshot (43) - Copy.png

      I have given most occuring product for reference.

      I need to return the product that is most frequently occuring product based on Measure .

      Here E should return, since it has highest occurrences even though its margin is great.

      My question is

      Screenshot (43).png

      when i have two or more most occuring product for eg D and E, then it should compare with the Margin % and should return D, since D has more margin %.

      The expression should work if there are same number of products or not.

      If there is no same number of occurrences, then directly it should print out highest margin % of highest occurences.

      if there is a tie between count of products then, highest one with margin % should be returned.

      How to achieve in qlik sense?