5 Replies Latest reply: Mar 3, 2017 4:10 AM by Rahul Pawar RSS

    Two level of aggregation: Require help

    Nidhi Gupta

      I need to get Top 5 OtherBrandOwned and for those 5 top brands what are the Top 1 OtherModelOwned.

       

      Data something like:

      Image1.JPG

       

      Output:

      Image4.JPG

      Image3.JPG

      A3 Purchased - 3903

      I am using text boxes to calculate these as we also need ratio of each value by Car Purchased -  A3/A4/A6 etc.

      I am able to get Top 5 OtherBrandOwned by using Rank() with Aggr() as shown above.

       

      However, I am unable to get Top 1 Models for each of these Brands correctly.

      For 4th Brand - Hyundai, I am getting model as 'Innova' which is incorrect.It should be Hyundai and Verna.

      For 5th Brand - Maruti, I am getting model as 'Verna' which is incorrect.It should be Maruti and Swift.

       

       

      How to customize the expression to get correct values for top 1 model. Please help.

       

      Message was edited by: Nidhi Gupta