4 Replies Latest reply: Sep 19, 2014 10:32 AM by Andy B RSS

    Use sort expression on drilldown

    Andy B

      Hello,

       

      Can somebody help me with this?

       

      I have a drilldown chart called "top 20 customers" with on the X axis year and next customers.

       

       

      In the beginnen when the years are shown, i want 2013 2014 in that order so from the sort tab i select "Numeric value - Ascending".

      But when i click on a year, i want the chart to be sorted by the value(numeric totals) on the data points, and NOT by customer name.

       

      So in that way, the total values are shown from highest to lowest.

       

      I suspect that on the sort tab, i need to override the group sort order and do an expression. But can somebody help me out with this?

       

      Thanks!

        • Re: Use sort expression on drilldown
          Ruben Marin

          Hi Andy,

           

          In the dialog where you set up the group (Dimensions tab --> Edit groups... --> select the group and press Edit) you can set how every field has to sort (Sort command... button)

           

          If you need a different sort for this graph you can use getcurrentfield funtion to catch the current field in the group.

           

          Hope this helps.

            • Re: Use sort expression on drilldown
              Andy B

              Hello,

               

              Thanks for the reaction but i do not think that this is what i need.

               

              When year is shown, i want to sort by X year Ascending, but when drilling down to X customer, i want to sort by Y-value eg the totals per customer.

               

              So what i need to do in the sort tab expression is if(getcurrentfield(drillDownYearCustomer='Year', *sort by year ascending*,*sort by Y-value descending*) But i do not know how to code the parts between the **

               

              Thanks!

            • Re: Use sort expression on drilldown

              Hi,

                

                  Write condition on sort tab  with Match function (=match(top20customers=2013,2014,so and so)) in expression,,uncheck the all box except expression

               

               

              Regards,

              Muni

              • Re: Use sort expression on drilldown
                Andy B

                Ok i got it now

                 

                to solve the problem i needed to check "expression" under the sort tab and enter

                if(getcurrentfield(drillDownYearCustomer)='year', 'year', sum(amount)) with descending

                 

                Next i checked "Numeric value" with ascending

                 

                Meaning years would be ascending and total amounts would be descending

                 

                solved