3 Replies Latest reply: Nov 25, 2015 11:08 PM by jagan mohan rao appala RSS

    Number formatting

    Kumar Pramod

      Hi all,

       

      I am using straight table to display some counts.

       

      Load Script:

      MetricsDims:

      LOAD * INLINE [ 

            Metrics 

          Invitations

          Landing Page Hits

          Sign-Ups

          Completions

          Completions Rate

      ];

       

      Using Metrics as dimension.

       

      In dimension field the last one Completions Rate is shown in % all others are counts. so i am not able to format it.

      Is their anyway to do it.

       

      You can see in the below image about the issue i am facing.

       

      12.png

      I have selected auto in number formatting, now i need to show only 6.70%  in last row.

       

      Thanks,

      Kumar

        • Re: Number formatting
          jagan mohan rao appala

          HI,

           

          Try like this to apply dynamic number formatting

           

          Num(Expression, If(Metric = 'Completions Rate',  '#,##0.00%', '#,##0'))

           

          Hope this helps you.

           

          Regards,

          Jagan.

            • Re: Number formatting
              Kumar Pramod

              Please check this and correct below expression

               

              Num(Expression,if(Metrics='Invitations',Count({$<DateType = {invitation},client_name={'Enova'},

              CanonicalDate = {">=$(vEnovaMinDate)<=$(max(date(CanonicalDate)),-1)"}>}invitation_id),

              if(Metrics='Landing Page Hits',count({$<DateType = {accessed},client_name={'Enova'},

              CanonicalDate = {">=$(vEnovaMinDate)<=$(max(date(CanonicalDate)),-1)"}>}invitation_id),

              if(Metrics='Sign-Ups',sum({$<DateType = {signed},client_name={'Enova'},

              CanonicalDate = {">=$(vEnovaMinDate)<=$(max(date(CanonicalDate)),-1)"}>}user_signed),

              if(Metrics='Completions',sum({$< DateType = {completion},client_name={'Enova'},

              CanonicalDate = {">=$(vEnovaMinDate)<=$(max(date(CanonicalDate)),-1)"}>}course_completed),

              if(Metrics='Completions Rate',(sum({$< DateType = {completion},client_name={'Enova'},

              CanonicalDate = {">=$(vEnovaMinDate)<=$(max(date(CanonicalDate)),-1)"}>}course_completed)/

              Count({$<DateType = {invitation},client_name={'Enova'},

              CanonicalDate = {">=$(vEnovaMinDate)<=$(max(date(CanonicalDate)),-1)"}>}invitation_id))*100

              )'#,##0.00%'

              )))))

                • Re: Number formatting
                  jagan mohan rao appala

                  HI,

                   

                  Try this

                   

                  =Num(if(Metrics='Invitations',Count({$<DateType = {invitation},client_name={'Enova'}, CanonicalDate = {">=$(vEnovaMinDate)<=$(max(date(CanonicalDate)),-1)"}>}invitation_id),

                  if(Metrics='Landing Page Hits',count({$<DateType = {accessed},client_name={'Enova'}, CanonicalDate = {">=$(vEnovaMinDate)<=$(max(date(CanonicalDate)),-1)"}>}invitation_id),

                  if(Metrics='Sign-Ups',sum({$<DateType = {signed},client_name={'Enova'},CanonicalDate = {">=$(vEnovaMinDate)<=$(max(date(CanonicalDate)),-1)"}>}user_signed),

                  if(Metrics='Completions',sum({$< DateType = {completion},client_name={'Enova'}, CanonicalDate = {">=$(vEnovaMinDate)<=$(max(date(CanonicalDate)),-1)"}>}course_completed),

                  if(Metrics='Completions Rate',(sum({$< DateType = {completion},client_name={'Enova'}, CanonicalDate = {">=$(vEnovaMinDate)<=$(max(date(CanonicalDate)),-1)"}>}course_completed)/

                  Count({$<DateType = {invitation},client_name={'Enova'}, CanonicalDate = {">=$(vEnovaMinDate)<=$(max(date(CanonicalDate)),-1)"}>}invitation_id))*100

                  ))))),  if(Metrics='Completions Rate','#,##0.00%', '#,##0'))

                   

                  Regards

                  Jagan.