3 Replies Latest reply: Mar 10, 2018 9:31 AM by Sunny Talwar RSS

    Help needed while calculating a percentage in a text object field

    Gonçalo Bernardino



      I'm trying to calculate a percentage in a text object field.


      So far, by using the bellow expression I was able to get the result I want, but it gives me the full % value. But what I really need it a round number with no decimals, or max two decimals numbers.


      My values are:

      CC: 69

      Other: 18

      Total (CC + Other) = 87


      My expression is:

      =count(if([Tipo de contacto]='CC',[Tipo de contacto]))/count([Tipo de contacto])*100 & ' %'


      Value gotten so far: 79,310344827586 %

      I'm looking for an expression that gives me something like: 79% or 79,31% (with only two decimals)print.JPG


      Many thanks for your help.