COMBIN DAX Function (Statistical)

Returns the number of combinations for a given number of items. Use COMBIN to determine the total possible number of groups for a given number of items.

Syntax

COMBIN ( <Number>, <Number_chosen> )
Parameter Attributes Description
Number

The number of items.

Number_chosen

The number of items in each combination.

Return values

Scalar A single integer value.

Returns the number of combinations for a given number of items.

Remarks

Numeric arguments are truncated to integers.

If either argument is nonnumeric, COMBIN returns the #VALUE! error value.

If number < 0, number_chosen < 0, or number < number_chosen, COMBIN returns the #NUM! error value.

A combination is any set or subset of items, regardless of their internal order. Combinations are distinct from permutations, for which the internal order is significant.

The equation for the number of combinations is: P( n, k ) = n! / ( k! ( n – k)! )

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

» 2 related functions

Examples

--  COMBIN returns the number of possible combinations of
--  a given number of items WITHOUT repetitions.
--  The internal order is not relevant.
--  Use PERMUT for the number of permutations, 
--  where the internal order is relevant.
--
--  Use COMBINA to compute combinations WITH repetitions.
--
--  COMBIN implements this calculation:
--  P(n,k) = n! / k!(n-k)!
--
--  For example, consider 3 elements ( A, B, C )
--  COMBIN ( 3, 2 ) returns 3 counting:
--       ( A, B )
--       ( B, C )
--       ( A, C )
EVALUATE 
{
    ( "COMBIN ( 3, 1 )", COMBIN ( 3, 1 ) ),
    ( "COMBIN ( 3, 2 )", COMBIN ( 3, 2 ) ),
    ( "COMBIN ( 3, 3 )", COMBIN ( 3, 3 ) ),
    ( "COMBIN ( 4, 1 )", COMBIN ( 4, 1 ) ),
    ( "COMBIN ( 4, 2 )", COMBIN ( 4, 2 ) ),
    ( "COMBIN ( 4, 3 )", COMBIN ( 4, 3 ) ),
    ( "COMBIN ( 4, 4 )", COMBIN ( 4, 4 ) )
}

Value1 Value2
COMBIN ( 3, 1 ) 3
COMBIN ( 3, 2 ) 3
COMBIN ( 3, 3 ) 1
COMBIN ( 4, 1 ) 4
COMBIN ( 4, 2 ) 6
COMBIN ( 4, 3 ) 4
COMBIN ( 4, 4 ) 1

Related functions

Other related functions are:

Last update: Oct 5, 2022   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo, Kenneth Barber,

Microsoft documentation: https://docs.microsoft.com/en-us/dax/combin-function-dax

2018-2022 © SQLBI. All rights are reserved. Information coming from Microsoft documentation is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Volatile

A volatile function may return a different result every time you call it, even if you provide the same arguments. Click to read more.

Deprecated

This parameter is deprecated and its use is not recommended.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

Contribute

Want to improve the content of COMBIN? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.