PERMUT DAX Function (Statistical)

Returns the number of permutations for a given number of objects that can be selected from number objects. A permutation is any set or subset of objects or events where internal order is significant. Permutations are different from combinations, for which the internal order is not significant. Use this function for lottery-style probability calculations.

Syntax

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

An integer that describes the number of objects.

Number_chosen

An integer that describes the number of objects in each permutation.

Return values

Scalar A single decimal value.

Returns the number of permutations for a given number of objects that can be selected from number objects.

Remarks

Both arguments are truncated to integers.

PERMUT raises an error when:

  • Number <= 0
  • number_chosen < 0
  • Number < number_chosen

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

» 2 related functions

Examples

--  PERMUT returns the number of permutations for a given
--  number of items selected from a number of objects.
--  A permutation is any set or subset of objects where the
--  internal order is relevant.
--
--  Use COMBIN for the number of combinations, 
--  where the internal order is not relevant.
--
--  PERMUT implements this calculation:
--  P(n,k) = n! / (n-k)!
--
--  For example, consider 3 elements ( A, B, C )
--  PERMUT ( 3, 2 ) returns 6 counting:
--       ( A, B )
--       ( B, A )
--       ( B, C )
--       ( C, B )
--       ( A, C )
--       ( C, A )
EVALUATE 
{
    ( "PERMUT ( 2, 1 )", PERMUT ( 2, 1 ) ),
    ( "PERMUT ( 2, 2 )", PERMUT ( 2, 2 ) ),
    ( "PERMUT ( 3, 1 )", PERMUT ( 3, 1 ) ),
    ( "PERMUT ( 3, 2 )", PERMUT ( 3, 2 ) ),
    ( "PERMUT ( 3, 3 )", PERMUT ( 3, 3 ) ),
    ( "PERMUT ( 4, 1 )", PERMUT ( 4, 1 ) ),
    ( "PERMUT ( 4, 2 )", PERMUT ( 4, 2 ) ),
    ( "PERMUT ( 4, 3 )", PERMUT ( 4, 3 ) ),
    ( "PERMUT ( 4, 4 )", PERMUT ( 4, 4 ) )
}

Value1 Value2
PERMUT ( 2, 1 ) 2
PERMUT ( 2, 2 ) 2
PERMUT ( 3, 1 ) 3
PERMUT ( 3, 2 ) 6
PERMUT ( 3, 3 ) 6
PERMUT ( 4, 1 ) 4
PERMUT ( 4, 2 ) 12
PERMUT ( 4, 3 ) 24
PERMUT ( 4, 4 ) 24

Related functions

Other related functions are:

Last update: Dec 4, 2024   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo, Poul Jørgensen, Kenneth Barber,

Microsoft documentation: https://docs.microsoft.com/en-us/dax/permut-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 PERMUT? 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.