Skip to Content
0

Rounding values in BEX after having scaling factor calculations

Nov 06, 2017 at 11:56 AM

67

avatar image
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.

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

Thanks

Kamal Kishore Gajula

10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

2 Answers

Best Answer
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
10 |10000 characters needed characters left characters exceeded
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
10 |10000 characters needed characters left characters exceeded
Former Member

Hi Varaprasad raju,

Thank you for quick reply.

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


0

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

0
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

0

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)
0