Skip to main content Skip to complementary content

Mod

Mod() is a modulo function that returns the non-negative remainder of an integer division. The first argument is the dividend, the second argument is the divisor, Both arguments must be integer values.

Syntax:  

Mod(integer_number1, integer_number2)

Return data type: integer

Limitations:  

integer_number2 must be greater than 0.

Examples and results:  

  • Mod( 7,2 ): returns 1
  • Mod( 7.5,2 ): returns NULL
  • Mod( 9,3 ): returns 0
  • Mod( -4,3 ): returns 2
  • Mod( 4,-3 ): returns NULL
  • Mod( -4,-3 ): returns NULL

Learn more

 

Did this page help you?

If you find any issues with this page or its content – a typo, a missing step, or a technical error – let us know how we can improve!

Join the Analytics Modernization Program

Remove banner from view

Modernize without compromising your valuable QlikView apps with the Analytics Modernization Program. Click here for more information or reach out: ampquestions@qlik.com