Forum Discussion

CeceliaMartin's avatar
CeceliaMartin
Qrew Cadet
12 years ago

numeric formatting limit digits

I have two numeric formulas that use price & percentage. However the results are quite long and I want to limit what it displays or round up.

for example the results are like this: 24.369918699187% & $1.5504166666667

I would like it to display and export like this: 24% & $1.55.

Can anyone give some advice on how I might go about doing this?



  • If you were just concerned about how it displays, then you could set the field properties as to how many decimals to display. But you also said "export to excel" - so you will need to change your actual formula to round.



    For the formula which has the percentage, try this

    Round(

    ..then keep your formula here

    ,0.0001)



    For the formula which has the $ amount, try this

    Round(

    ..then keep your formula here

    ,0.01)









  • that is great.  what if I didn't want to round but just wanted to show/export those decimal places...which would I use?
  • that is great.  what if I didn't want to round but just wanted to show/export those decimal places...which would I use?
  • If you want to change how it displays in Quickbase, but still want to preserve all the decimals for exports! then don't do that around formula at all.  Just change the Field properties to set the number of digits for rounding for presentation purposes on forms and reports.
  • I actually want to export without the decimals also.  Is there something like round that can be used?
  • I'm confused by this last comment.  I gave the formula in my original answer of how to set the rounding for export.  I must not be understanding your latest comment.
  • sorry for the confusion.  So, yes the rounding works.  However my question is this:  I have a number: $2.5567.  I do NOT want to round but I want to display and export it as $2.55 (so it is not automatically rounding up to $2.56 but just displaying & exporting the first two decimal places). I also have a percentage 30.5555%, I want to display & export to excel as 30% (again not rounding up to 31%), Is that possible to show the number like that without rounding?
    • MelanieBroughto's avatar
      MelanieBroughto
      Qrew Member
      Hi Cecelia, were you ever able to figure this out? because I am in need of the same answer that you were seeking to have.
    • _anomDiebolt_'s avatar
      _anomDiebolt_
      Qrew Elite
      I think you are looking for these types of formulas using Floor(x, y) with two arguments:
      Floor([Price], 0.01)
      Floor([Percentage], 0.01)

    • MelanieBroughto's avatar
      MelanieBroughto
      Qrew Member
      Thank You for providing this.......I am having trouble finding where I am to enter this formula. I am in the Field Properties but I am not seeing where to enter this formula in order for the Percent Field to appear as such.