cancel
Showing results for 
Search instead for 
Did you mean: 

How to determine if Key Figure is a whole number (no numbers after decimals)

Former Member
0 Kudos

Hi,  anyone know how to do this:   Alert KF:    If KF1 / KF2 is a whole number (no numbers after decimals),  then alert is 1 otherwise 0.

Thanks!

Accepted Solutions (1)

Accepted Solutions (1)

0 Kudos

Hi,

Try this:

Alert KF = IF(((KF1/KF2)%1)=0,1,0)

Regards,

Kent

Former Member
0 Kudos

Thanks for your response!  I havent seen the % sign as a valid operator in the available documentation for the possible calculations.    What does % do and did you see this in one of the demo models or somewhere else?  Does you proposal work in following scenarios:    

KF2 is 5x KF1   e.g  KF1 = 100,  KF2 = 500

KF1 is 5x KF12 e.g   KF1 = 500,  KF2 = 100

0 Kudos

Hi John,

Yes, this is in the documentation (section 8.9 Commonly Used Functions).  It is the modulus operator.

You can test your logic in Excel with the MOD() function. They both give you the remainer of a result.  So by dividing your KF by a value of 1, the % operator will just provide you with the remainer for that KF.

Regards

Former Member
0 Kudos

Thanks Kent!  I was looking in the 4.0 FP01 Patch 3 model configuration guide and didn't see modulus functionality.  But your right,   it has been added since then.

Regards

Answers (0)