Forum Discussion

ChrisBaker1's avatar
ChrisBaker1
Qrew Cadet
6 years ago

Limiting multiple decimal points

I am creating a summary report to track an average number related to a field (# of days since the customer was last contacted). I was able to create the report without issue but the averages that are displayed have like 10 decimal places displayed. I would like to only have one decimal place displayed. The field that is being averaged is set up to not show any decimal places so I believe the issue is within the report that I built. I'm thinking that I will need to add a formula to the report. Does anyone have an idea as to how to write that formula or any other solutions?

6 Replies

  • You have not said what field type this is.  If it is a numeric field type, then typically when you set the number of decimal places to 0 (zero) then it will respect that setting.  

    If this is a duration field type,  and it is not respecting the number of decimals, then a work around would be to make a new field which is a numeric field with the formula

    ToDays([My Duration field]) and set the number of decimals at zero

    • BarryDolan1's avatar
      BarryDolan1
      Qrew Member
      How would you write the code to limit the decimal to 2 using a rich text formula?

      ------------------------------
      Barry Dolan
      ------------------------------
      • MarkShnier__You's avatar
        MarkShnier__You
        Qrew Champion
        I have a variety of formulas, see if this one works

        ToFormattedText([Price],"comma_dot",3) &
        If(
        not Contains(ToText([Price]),"."),
        ".00",
        Length(Right(ToText([Price]),"."))=1,"0"
        )

        ------------------------------
        Mark Shnier (YQC)
        Quick Base Solution Provider
        Your Quick Base Coach
        http://QuickBaseCoach.com
        mark.shnier@gmail.com
        ------------------------------
  • The field type is "Formula - Duration" but I don't believe that is the problem as it is already set up to not display any decimal places. The issue is that the summary report is taking the average of values in this field and displaying it with multiple decimal places. There is an option to add "Report Formulas". Is this where I can have the averages displayed with one decimal place? If yes, can you help with the formula?
  • That sounds like a bug which should be reported to Customer Care.  I would just do what I suggested to convert that to a numeric field and then it will work.