Description:
This function returns the remainder after the number is divided by divisor. The result has the same sign as the divisor.
Syntax: MOD (Number, Divisor)
Remarks
Example
The MOD function can be used in any database where you have stored values for a number and the divisor and you wish to calculate the Modulus between those numbers. The MOD value is returned with the help of this function. This function displays the remainder value after dividing the number with the divisor, which two numbers are specified as parameters to the formula or referenced from the cube.
=MOD (9, 2) |
-MOD value / remainder for the given number and the divisor parameter numbers (1) |
=MOD (6, 67) |
-MOD value / remainder for the given number and the divisor parameter numbers (6) |
=MOD ("range1", "range2") |
-MOD value / remainder for the given number and the divisor parameter number. |
Let us take the example of a cube in PowerOLAP which has data which is the information in numbers amongst which you want to calculate the "MOD" value. If in the same dimension in another member or in another dimension in another cube, you want to display the calculated MOD value for the two parameters, then it is appropriate to use the MOD function to calculate the MOD value between the numbers. In this case we can write a formula in the cube in PowerOLAP to pull in values from 2 or more members of a dimension of a cube and write them to the other member which holds the MOD value or you can also do this for a different dimension in a different cube.
The formula above writes values into the "NumFunctionValuesData" cube to the "MOD" member in the NumFunctionValues dimension (data is at the intersection with the MathValue member of the Version dimension). This is done by calculating the MOD between the two parameters given to the function. The parameters belong to the "NumFunctionValues" dimension. The MOD function takes the "NUMBER1" and the "DIVISOR" members as the parameters which are given to the function and it calculates the MOD value from amongst these members. The MOD is basically the remainder value that remains after any given number is divided by the divisor. The calculated result is written into the same cube in the "MOD" member of the "NumFunctionValues" dimension.