17 Replies Latest reply: Dec 14, 2015 8:55 AM by bruno bertels RSS

    Number formatting and Decimal Point

      Hi all,

       

      The below expression gives me the decimal output as (5.4%) when i used NumberFormatting---> Number ---> single decimal point(1.1%)

      But how can i achieve this using Number formatting as auto.

       

      sum({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-30))<$(=date(Max(CanonicalDate)))"}, DateType={'completion'}>}course_completed)

      /

      count({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-30))<$(=date(Max(CanonicalDate)))"}, DateType= {'invitation'}>} invitation_id)

       

      I Tried Round, Ceil , and Floor  but i am getting different values.

      And also i tried with

       

      Num(sum({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-30))<$(=date(Max(CanonicalDate)))"}, DateType={'completion'}>}course_completed)

      /

      count({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-30))<$(=date(Max(CanonicalDate)))"}, DateType= {'invitation'}>} invitation_id),'#,##0.00%', '#,##0')

       

      How can i achieve this requirement?

       

      Thanks,

      Pramod

        • Re: Number formatting and Decimal Point
          Jonathan Dienst

          Num(sum({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-30))<$(=date(Max(CanonicalDate)))"}, DateType={'completion'}>} course_completed)

          /

          count({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-30))<$(=date(Max(CanonicalDate)))"}, DateType= {'invitation'}>} invitation_id),'0.0%')

            • Re: Number formatting and Decimal Point

              Thanks For the reply,

               

              Is it the right way of doing calculation ?

              (5.4%-5-5%)/5.4%=?

               

              Is the below expression is corrrect for above calculation?

               

              (Num(sum({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-30))<$(=date(Max(CanonicalDate)))"}, DateType= {'completion'}>} course_completed)/

              count({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-30))<$(=date(Max(CanonicalDate)))"}, DateType= {'invitation'}>} invitation_id),'0.0%')

              -

              num(sum({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-60))<$(=date(Max(CanonicalDate)-30))"}, DateType= {'completion'}>} course_completed)/

              count({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-60))<$(=date(Max(CanonicalDate)-30))"}, DateType= {'invitation'}>} invitation_id),'0.0%'))

              /

              (Num(sum({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-30))<$(=date(Max(CanonicalDate)))"}, DateType= {'completion'}>} course_completed)/

              count({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-30))<$(=date(Max(CanonicalDate)))"}, DateType= {'invitation'}>} invitation_id),'0.0%'))

                • Re: Number formatting and Decimal Point
                  jagan mohan rao appala

                  Hi Pramod,

                   

                  Give number format for the final number, instead of giving for every expression

                   

                  Like Num((5.4%-5-5%)/5.4%, '0.0%').

                   

                  (Num(sum({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-30))<$(=date(Max(CanonicalDate)))"}, DateType= {'completion'}>} course_completed)/

                  count({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-30))<$(=date(Max(CanonicalDate)))"}, DateType= {'invitation'}>} invitation_id)

                  -

                  sum({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-60))<$(=date(Max(CanonicalDate)-30))"}, DateType= {'completion'}>} course_completed)/

                  count({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-60))<$(=date(Max(CanonicalDate)-30))"}, DateType= {'invitation'}>} invitation_id))

                  /

                  (sum({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-30))<$(=date(Max(CanonicalDate)))"}, DateType= {'completion'}>} course_completed)/

                  count({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-30))<$(=date(Max(CanonicalDate)))"}, DateType= {'invitation'}>} invitation_id),'0.0%'))

                  • Re: Number formatting and Decimal Point
                    balraj ahlawat

                    try like this:

                     

                    Num(

                    (sum({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-30))<$(=date(Max(CanonicalDate)))"}, DateType= {'completion'}>} course_completed)/

                    count({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-30))<$(=date(Max(CanonicalDate)))"}, DateType= {'invitation'}>} invitation_id))

                    -

                    (sum({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-60))<$(=date(Max(CanonicalDate)-30))"}, DateType= {'completion'}>} course_completed)/

                    count({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-60))<$(=date(Max(CanonicalDate)-30))"}, DateType= {'invitation'}>} invitation_id)))

                     

                    /

                    (sum({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-30))<$(=date(Max(CanonicalDate)))"}, DateType= {'completion'}>} course_completed)/

                    count({$<CanonicalDate={">=$(=date(Max(CanonicalDate)-30))<$(=date(Max(CanonicalDate)))"}, DateType= {'invitation'}>} invitation_id))

                    ,'0.0%')

                • Re: Number formatting and Decimal Point

                  5.png

                  In above image you can observe the count in textbox without num(), while doing subtraction it is using the 0.0542279... value how can i restrict that it should use only 0.054. Even i used num() for each expression also it's using the complete value.

                  • Re: Number formatting and Decimal Point

                    Any suggestions over this?