2 Replies Latest reply: Nov 17, 2015 6:13 AM by Jonathan Dienst RSS

    sorting

    Kumar Pramod

      Hi all,

       

      I have a straight table, i need to order the rows in certain order how can i do it?

      report.png

       

      I need in the below order :

      Invitation

      Not signed First

      signed first

      Not signed second

      signed second

      Not signed third

      signed third.


      I am using below dimension :

      IF(match(metrics_email_type_id, '44'), Replace(metrics_email_type_id, '44', 'InvitationEmail'),

      IF(match(metrics_email_type_id, '2'), Replace(metrics_email_type_id, '2', 'Signed First Reminder'),

      IF(match(metrics_email_type_id, '45'), Replace(metrics_email_type_id, '45', 'Not Signed First Reminder'),

      IF(match(metrics_email_type_id, '3'), Replace(metrics_email_type_id, '3', 'Signed Second Reminder'),

      IF(match(metrics_email_type_id, '46'), Replace(metrics_email_type_id, '46', 'Not Signed Second Reminder'),

      IF(match(metrics_email_type_id, '4'), Replace(metrics_email_type_id, '4', 'Signed Third Reminder'),

      IF(match(metrics_email_type_id, '47'), Replace(metrics_email_type_id, '47', 'Not Signed Third Reminder'),

      IF(match(metrics_email_type_id, '126'), Replace(metrics_email_type_id, '126', 'Not Signed Fourth Reminder'),

      metrics_email_type_id))))))))

        • Re: sorting
          Tamil Nagaraj

          Hi Kumar,


          Type like below in sort expression

           

          Pick(Match(SortDimension,'Custom Sort 1', 'Custom Sort 2', etc),Name1, Name2, etc)

           

          Capture.PNG

          • Re: sorting
            Jonathan Dienst

            A better option might be to use dual formatting like this:

             

            Pick(Match(metrics_email_type_id, 44, 2, 45, 3, 46, 4, 47, 126) + 1,

              Dual(metrics_email_type_id, metrics_email_type_id + 200),

              Dual('InvitationEmail', metrics_email_type_id),

              Dual('Signed First Reminder', metrics_email_type_id),

              Dual('Not Signed First Reminder', metrics_email_type_id),

              Dual('Signed Second Reminder', metrics_email_type_id),

              Dual('Not Signed Second Reminder', metrics_email_type_id),

              Dual('Signed Third Reminder', metrics_email_type_id),

              Dual('Not Signed Third Reminder', metrics_email_type_id),

              Dual('InvitationEmail', metrics_email_type_id),

              Dual('Not Signed Fourth Reminder', metrics_email_type_id)

            )

             

            And then sort numerically.