6 Replies Latest reply: Nov 17, 2015 5:02 AM by Kumar Pramod RSS

    Groups in table

    Kumar Pramod

      Hi all,

       

      I am using below expression to get the count in straight table. I need to add the counts of metrics_email_type_id 2 and 45 and need to show the sum in the column below the count of 45.

       

      As explained i need the count of 3 and 46 below 46, 4 and 47 below 47.

       

      IF(match(metrics_email_type_id, '44'), sent,

      IF(match(metrics_email_type_id, '2'), sent,

      IF(match(metrics_email_type_id, '45'), sent,

      IF(match(metrics_email_type_id, '3'), sent,

      IF(match(metrics_email_type_id, '46'), sent,

      IF(match(metrics_email_type_id, '4'), sent,

      IF(match(metrics_email_type_id, '47'), sent,

      IF(match(metrics_email_type_id, '126'), sent,metrics_email_type_id))))))))

       

       

      How can i achieve this?

       

      Regards,

      Kumar

        • Re: Groups in table
          balraj ahlawat

          Is this you are asking?

           

          sum(IF(match(metrics_email_type_id, '3','46',4','47'),count(metrics_email_type_id)) as Total Counts

            • Re: Groups in table
              Kumar Pramod

              IF(match(metrics_email_type_id, '44'), sent,

              IF(match(metrics_email_type_id, '2'), sent,

              IF(match(metrics_email_type_id, '45'), sent,

              //here the sum of 2 and 45

              IF(match(metrics_email_type_id, '3'), sent,

              IF(match(metrics_email_type_id, '46'), sent,

              //here the sum of 3 and 46

              IF(match(metrics_email_type_id, '4'), sent,

              IF(match(metrics_email_type_id, '47'), sent,

              //here the sum of 4 and 47

              IF(match(metrics_email_type_id, '126'), sent,metrics_email_type_id))))))))

                • Re: Groups in table
                  balraj ahlawat

                  like this?

                   

                  IF(match(metrics_email_type_id, '44'), sent,

                  IF(match(metrics_email_type_id, '2'), sent,

                  IF(match(metrics_email_type_id, '45'), sent,

                  IF(match(metrics_email_type_id, '2','45'), sum(count(metrics_email_type_id)), //u can use distinct as well

                  IF(match(metrics_email_type_id, '3'), sent,

                  IF(match(metrics_email_type_id, '46'), sent,

                  IF(match(metrics_email_type_id, '3','46'), sum(count(metrics_email_type_id)), //u can use distinct as well

                  IF(match(metrics_email_type_id, '4'), sent,

                  IF(match(metrics_email_type_id, '47'), sent,

                  IF(match(metrics_email_type_id, '4','47'), sum(count(metrics_email_type_id)), //u can use distinct as well

                  IF(match(metrics_email_type_id, '126'), sent,metrics_email_type_id))))))))

                    • Re: Groups in table
                      Kumar Pramod

                      Using below expression as dimension in first column,

                      I need to add total in between how can i hardcode total in between

                       

                      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')

                      //Total of 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'),

                      //Total of 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'),

                      //Total of third reminder

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

                      metrics_email_type_id))))))))