Important: We've redesigned the Amazon QuickSight analysis workspace. You might encounter screenshots or procedural text that doesn't reflect the new look in the QuickSight console. We're in the process of updating screenshots and procedural text.
To find a feature or item, use the Quick search bar.
For more information on QuickSight's new look, see Introducing new analysis experience on Amazon QuickSight
Mod
Use the mod
function to find the remainder after dividing the number by the
divisor. You can use the mod
function or the modulo operator (%)
interchangeably.
Syntax
mod(
number
,divisor
)
number
%divisor
Arguments
 number

The number is the positive integer that you want to divide and find the remainder for.
 divisor

The divisor is the positive integer that you are dividing by. If the divisor is zero, this function returns an error on dividing by 0.
Example
The following examples return the modulo of 17 when dividing by 6. The first example uses the % operator, and the second example uses the mod function.
17%6
mod( 17, 6 )
The following value is returned.
5