MOD Function in MDX

MOD Function in MDX

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)*2)
 
Sample code is below:
 
with member number1 as 5
member number2 as 2
member mod as (number1-(Int(number1/number2)*2))
select mod on 0 from [Adventure Works]

Answered Forum Thread: MOD Function in MDX
Sort by: Published Date | Most Recent | Most Useful
Comments
Page 1 of 1 (2 items)