• Resolved Marc_O

    (@marc_o)


    Hello,
    I’m using your plugin and it works great.
    I have a calculation of field on which I apply the round function to have a number without decimal but I would like to know if the number I get can have another rule.
    Let’s say the number I get is 1001, 1002… or 1009 (anything except finishing with a 0 or 5).
    Is there a way to have the number always finishing with 0 or 5 depending which one is the closest ?
    Thank you
    Regards

Viewing 3 replies - 1 through 3 (of 3 total)
  • Plugin Author wundermatics

    (@wundermatics)

    Hi,

    Yes, this can be achieved with some simple math using this formula (where X is the name of the field):
    round(x/5)*5

    You can do similar rounding to the nearest even 5, 10 or 20 like this:

    • round(x/5)*5
    • round(x/10)*10
    • round(x/20)*20

    Also, have a look at the following spreadsheet to see some examples of what these formulas will return:
    https://snipboard.io/Kl10XJ.jpg

    Plugin Contributor nick6352683

    (@nick6352683)

    I never thought to use the round function in such ways – simply genius !!!

    Thread Starter Marc_O

    (@marc_o)

    Thank you very much ! ??

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Possibility to have another rule after round ?’ is closed to new replies.