2 Replies Latest reply on May 31, 2016 10:54 AM by Tom W

    Sorting One Measure Value After Another

    Ashwin Chandak



      I am trying to perform a nested sort on two measure values,


      For example, if I have two measures: Sales Volumes and Days in Inventory,  I want to sort the sales volumes in descending and then sort the days in inventory in descending


      I know there are methods of sorting dimensions using Rank(), Index() and a combined field, but I can only sort the values one at a time.


      Please find attached a packaged workbook and underlying data for the same. Tom W, any workarounds?


      Can there be a way to achieve this? Any workaround will help. Thanks.




        • 1. Re: Sorting One Measure Value After Another
          John Sobczak

          For the 2 column nested sort BOTH in descending order scenario you describe, you can create a calculated field:   [Sales Volume]*10000000 + [Days in Inventory]  and sort descending on that calculated field without placing it in the view.

          • 2. Re: Sorting One Measure Value After Another
            Tom W

            You didn't need to create a new thread, you should have attached it into your original thread.


            I don't understand why you need to sort like this - in the example you've shown, sorting by sale volume would be exactly the same as sorting by sale volume first then by days inventory. The only case where you would see it change is if you had two products with the same sale volume.


            Perhaps you can tell me how you would expect it to sort based on the sample data?