Skip to main content
Solved

Round numbers to the nearest 0.05

  • February 20, 2020
  • 4 replies
  • 132 views

Forum|alt.badge.img

Hello,

I would like to round numbers to the nearest 0.05. Like this:

-2.33 > -2.35

-2.32 > -2.30

Is this possible within the AttributeRounder? Or how can I get this result?

 

Thanks in advance,

Eva

Best answer by ebygomm

You can do this in an attribute creator

@round(@Value(number)*20)/20.0

 

This post is closed to further activity.
It may be an old question, an answered question, an implemented idea, or a notification-only post.
Please check post dates before relying on any information in a question or answer.
For follow-up or related questions, please post a new question or idea.
If there is a genuine update to be made, please contact us and request that the post is reopened.

4 replies

ebygomm
Influencer
Forum|alt.badge.img+44
  • Influencer
  • 3427 replies
  • Best Answer
  • February 20, 2020

You can do this in an attribute creator

@round(@Value(number)*20)/20.0

 


takashi
Celebrity
  • 7843 replies
  • February 20, 2020

A possible way is: multiply the original value by 2, round the resulting value with the AttributeRounder (Decimal Places: 1, Round Off Direction: Nearest), divide the resulting value by 2.


Forum|alt.badge.img
  • Author
  • 21 replies
  • February 20, 2020

You can do this in an attribute creator

@round(@Value(number)*20)/20.0

 

Ah yes that works! Thanks for the quick reply :-)


Forum|alt.badge.img
  • Author
  • 21 replies
  • February 20, 2020

A possible way is: multiply the original value by 2, round the resulting value with the AttributeRounder (Decimal Places: 1, Round Off Direction: Nearest), divide the resulting value by 2.

This also works, thanks!