Skip to Content
avatar image
Former Member

Rounding values in BEX after having scaling factor calculations

Hi Experts,

I am having a requirement for rounding values.

In the data basis we have value as "10600000.00". requirement is to apply "input scaling factor" and show without decimal values. which should result in showing value in Bex report as "11".
to Achieve i have created 2 CKF, called 1CKF & 2CKF

1CKF formula "Period Value GC / 1,000,000"

2nd will use the following formula

( FRAC ( ‘1CKF’ ) < 0.5 ) * FLOOR ( ‘1CKF’ ) + ( FRAC ( ‘1CKF’) >= 0.5 ) * CEIL (‘1CKF’)

This is working fine for Positive values like 10600000.00.. showing as 11

However, its not working for the Negative values like -10400000 .. report showing as 11. instead of 10.

Hope i am clear about in detailing my query. Please help.

Thanks

Kamal Kishore Gajula

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

2 Answers

  • Best Answer
    Nov 07, 2017 at 12:13 PM

    Hi,use

    abs(CKF1) in stead of CKF1 and use new result in new calc kf:

    (CKF1<0)*-1*new result + (CKF1>0)*new result

    Add comment
    10|10000 characters needed characters exceeded

  • Nov 07, 2017 at 06:39 AM

    Hi,

    Why didn't you use standard property available for KF's called Scaling Factor. This function will also do exactly same like what you are expecting.

    Thanks,

    Raju

    Add comment
    10|10000 characters needed characters exceeded

    • Hi,

      There is no issue with your Bex Calculations.

      Mathematically its correct to show Floor of -10.4 is -11 & Ceil is -10.Because -11 is smaller than -10.

      How to prove ?

      **Just try in excel as below.

      Still not convinced...then try in Bex just show Period Value GC with scaling factor 1,000,000 as another column(KF).

      Thanks,

      Raju

      4kade.png (11.0 kB)