Skip to Content

Handling 'Division by Zero' Calculations in KF

Jul 13, 2017 at 09:01 AM


avatar image
Former Member

Hello Team,

Basic mathematics teaches that 'Division by Zero' makes no meaning.

But, we have few Unit-rate Key figures calculations which deals with divisions. Sometimes, we get null / Zero values for the Divisor KF.

For example, If X=A/B..some times for some product-locations combinations, we get 0's for B.


* When i create a planning view template and it has KF 'X' and X is planned for 50+ Locations. Now even if One Location has a 'Division by Zero' scenario, system is not opening the template and throwing an run-time error

I can't keep filters, because i'm not sure which location data will have this 0 values.

System can't restrict the user to even opening the template at first hand or even plotting analytics charts in Fiori. User will be dealing with multiple templates and every templates has multiple KF's and planned across many entities. And the data comes from external system. How can user have a track on this ?

Is there a way to deal with it.

Throw some light



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

1 Answer

Best Answer
avatar image
Former Member Jul 13, 2017 at 09:30 AM

I found the solution.

X=A/B. And if B is Zero, system throws a run time error.

Write the below calculation like,

X = If(ISNULL(B),0,A/B)

Thats it.

Straight forward



10 |10000 characters needed characters left characters exceeded