0 Replies Latest reply: Sep 23, 2015 8:33 AM by Christian Reed RSS

    Sort by Expression Not Working as Expected

      Greetings.  I have what I felt was a simple-to-solve issue; however, all of my searches only found one other community member expressing that he had the same issue, without any solution offered.


      I have a Pivot Table with 6 dimensions and one expression (see attached Excel spreadsheet).  Customer is the dimension on which I would like to sort descending based on the same expression in the pivot table.  In short, I want to see a list of customers sorted by the number of servers purchased by each customer in descending order.  But, it is possible for the customer to be listed in more than one dimension.  For example, a customer can buy more than one category of server.


      The sort works well as I have it, but it sorts the customers based on their overall purchases regardless of the categories in which they fall.  If a customer buys Unix and Linux servers, such as "Dummy Company" in the attached spreadsheet, then that customer will appear in both places, but be sorted still based on the sum total of its purchases and not by the total of its purchases in that product category.


      It seems to me that it should be possible to set an expression that would mimic the pivot table's dimension groupings and sort accordingly.  Nevertheless, I cannot figure it out.  Do I need to use the AGGR function here?  I have tried, but the results are never as I hoped.  Thank you for any help.


      Best Regards,