GCD Function (DAX)

How does the GCD function (DAX) work?

The GCD function (DAX) returns the two or more integers largest common divisor. The most common divisor is the largest integer dividing both number1 and number2 without a residual. 

GCD Formula Syntax

GCD(number1, [number2], …)

How do you use the GCD function?

If any argument is nonnumeric, GCD returns the #VALUE! error value.

If any argument is less than zero, GCD returns the #NUM! error value.

Related Blog Posts

Related Support Forum Posts

Understanding DAX Formula
Developing Complex Dax functions

Considerations when using the GCD function

One divides any value evenly.

A prime number has only itself and one as even divisors.

If a parameter to GCD is >=2^53, GCD returns the #NUM! error value.

Related Video Tutorials

Formula examples using the GCD function


Related Course Modules



To access our comprehensive DAX formula reference guide just insert your email address below. The resource will download immediately and we’ll also email it to you.