Skip to main content
Solved

Rounder values

  • May 24, 2023
  • 3 replies
  • 16 views

mr_fme
Enthusiast
Forum|alt.badge.img+9

hi,

 

how to round values, for example: 5.1 = 6, 7.8 = 8 and so on...

 

Thank´s

Best answer by geomancer

Use an AttributeRounder, with parameters Decimal Places: 0, Round-off Direction: Up.

 AttributeRounder

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.

3 replies

geomancer
Evangelist
Forum|alt.badge.img+58
  • Evangelist
  • 932 replies
  • Best Answer
  • May 24, 2023

Use an AttributeRounder, with parameters Decimal Places: 0, Round-off Direction: Up.

 AttributeRounder


mr_fme
Enthusiast
Forum|alt.badge.img+9
  • Author
  • Enthusiast
  • 145 replies
  • May 24, 2023

Thank´s


david_r
Celebrity
  • 8392 replies
  • May 25, 2023

You could also use the following function embedded into e.g. an AttributeManager:

@ceil(@Value(my_attribute_to_round_up))

@ceil() is documented here: 

https://docs.safe.com/fme/html/FME_Desktop_Documentation/FME_Transformers/!Transformer_Parameters/math_functions.htm