Skip to Content
author's profile photo Former Member
Former Member

Round a Key Figure to the nearest Integer Value

Hi Expert,

i have the necessity, in BEx, to round a Key Figure to the nearest integer value, for example:

Before:3,4 --> After:3

Before:3,6 --> After:4

The "TRUNC" option simply removes decimals but does not make any approximation.

Many thanks in advance

Fabio

Add a comment
10|10000 characters needed characters exceeded

Related questions

2 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2005 at 12:11 PM

    Create a calculated KF that use trun(CK + 0,5).

    In your sample:

    Before:trunc(3,4 + 0,5) --> After:3

    Before:trunc(3,6 + 0,5) --> After:4

    Hope it helps.

    Regards

    Add a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on Dec 05, 2005 at 01:46 PM

    Thanks Paolo, that's a good solution!

    Message was edited by: Fabio Cappabianca

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.