COMBINA

Applies to: Calculated column Calculated table Measure Visual calculation

Returns the number of combinations (with repetitions) for a given number of items.

Syntax

COMBINA(number, number_chosen)

Parameters

Term Definition
number The number of items. Must be greater than or equal to 0 after rounding. Non-integer values are rounded to the nearest integer.
number_chosen The number of items in each combination. Must be greater than or equal to 0 after rounding. Non-integer values are rounded to the nearest integer.

Return value

Returns the number of combinations (with repetitions) for a given number of items. The return type is a decimal number.

Remarks

  • Because repetitions are allowed, number_chosen can be greater than number.

  • After rounding, if number is 0, number_chosen must also be 0. COMBINA(0, 0) returns 1; COMBINA(0, 1) returns an error.

  • If the value of either argument is outside of its constraints, COMBINA returns the #NUM! error value.

  • If either argument is a non-numeric value, COMBINA returns the #VALUE! error value.

  • The following equation is used, where $N$ is Number and $M$ is Number_chosen:

    $${N+M-1 \choose N-1}$$

  • This function is not supported for use in DirectQuery mode when used in calculated columns or row-level security (RLS) rules.

Example

Formula Description Result
= COMBINA(4,3) Returns the number of combinations (with repetitions) for 4 and 3. 20
= COMBINA(10,3) Returns the number of combinations (with repetitions) for 10 and 3. 220
= COMBINA(4.6,2) Rounds 4.6 to 5, then returns the number of two-item combinations (with repetitions) from 5 items. 15
= COMBINA(3,5) Returns the number of five-item combinations (with repetitions) from 3 items. 21