COMBINA DAX Function (Statistical)

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

Syntax

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

Must be greater than or equal to 0, and greater than or equal to Number_chosen. Non-integer values are truncated.

Number_chosen

Must be greater than or equal to 0. Non-integer values are truncated.

Return values

Scalar A single integer value.

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

Remarks

Numeric arguments are rounded to integers.

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 equation for the number of combinations (with repetitions) is C( N + M − 1, N − 1).

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

» 2 related functions

Examples

--  COMBINA returns the number of possible combinations of
--  a given number of items WITH repetitions.
--  The internal order is not relevant.
--  Use COMBIN to compute combinations WITHOUT repetitions.
--
--  For example, consider 3 elements ( A, B, C )
--  COMBINA ( 3, 2 ) returns 6 counting:
--       ( A, A )
--       ( B, B )
--       ( C, C )
--       ( A, B )
--       ( B, C )
--       ( A, C )
EVALUATE 
{
    ( "COMBINA ( 3, 1 )", COMBINA ( 3, 1 ) ),
    ( "COMBINA ( 3, 2 )", COMBINA ( 3, 2 ) ),
    ( "COMBINA ( 3, 3 )", COMBINA ( 3, 3 ) ),
    ( "COMBINA ( 4, 1 )", COMBINA ( 4, 1 ) ),
    ( "COMBINA ( 4, 2 )", COMBINA ( 4, 2 ) ),
    ( "COMBINA ( 4, 3 )", COMBINA ( 4, 3 ) ),
    ( "COMBINA ( 4, 4 )", COMBINA ( 4, 4 ) )
}

Value1 Value2
COMBINA ( 3, 1 ) 3
COMBINA ( 3, 2 ) 6
COMBINA ( 3, 3 ) 10
COMBINA ( 4, 1 ) 4
COMBINA ( 4, 2 ) 10
COMBINA ( 4, 3 ) 20
COMBINA ( 4, 4 ) 35

Related functions

Other related functions are:

Last update: Oct 3, 2024   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo, Kenneth Barber,

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

2018-2024 © 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 COMBINA? 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.