Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
MDX has variety of functions to support the user needs. MDX lacks the function to find the modulo operation. But we can achieve the modulo operation by using the calculated member.
Formula: number1 - (Int(number1/number2) * number2)
Sample code is below:
WITH
MEMBER number1 AS 5
MEMBER number2 AS 3
MEMBER mod AS
number1 - Int(number1 / number2) * number2
SELECT
{ mod } ON 0
FROM [Adventure Works];
Answered Forum Thread: MOD Function in MDX