0

# Rounding values in BEX after having scaling factor calculations

Nov 06, 2017 at 11:56 AM

67

Former Member

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.

Thanks

Kamal Kishore Gajula

Koen Hesters Nov 07, 2017 at 12:13 PM
0

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

Share
Varaprasad Raju Potturi Nov 07, 2017 at 06:39 AM
0

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

evdna.png (18.7 kB)
Show 4 Share
Former Member

Yes the option of scaling factor can be useful when its fixed and not an user input. In this case user wants it to be an input variable. Hence i have taken different option.

thanks

Former Member

Hi,

You mean...user will key in whether he want scaling in 1000s or Millions?

In your CKF which part will be passed by user ?

Thanks,

Raju

Former Member

Hi,

I understand, my mistake i have used "1000,000" instead of variable name. Please find the below details of 1CFK formula.

1CKF formula "Period Value GC / Scaling factor(input parameter)"

Hope this clarifies.

thanks

Kamal Kishore Gajula

Former Member

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