PercentileMode.SqlDisc

Updated on

PercentileMode.SqlDisc (3) is an enumeration that specifies the percentile mode type. It is a member of the PercentileMode.Type and indicates that when interpolating values for List.Percentile, a method compatible with SQL Server’s PERCENTILE_DISC should be used.

Examples

Find the quartiles of the list { 1, 1, 15, 80, 85 } using an interpolation method matching SQL Server’s PERCENTILE_DISC.

// Returns { 1, 15, 80 }
= List.Percentile( 
    { 1, 1, 15, 80, 85 }, 
    { 0.25, 0.5, 0.75 }, 
    [ PercentileMode = PercentileMode.SqlDisc ] 
)

Some other examples using PercentileMode.SqlDisc are:

// Returns { 1, 80 }
= List.Percentile( 
    { 1, 1, 15, 80, 85 }, 
    { 0.25, 0.75 }, 
    [ PercentileMode = PercentileMode.SqlDisc ] 
)

// Returns { 1, 1, 5, 5, 15, 15 }
= List.Percentile( 
    { 1, 5, 15, 80, 100 }, 
    { 0.1, 0.2, 0.3, 0.4, 0.5, 0.6 }, 
    [ PercentileMode = PercentileMode.SqlDisc ] 
)

Other related enumerations are:

Applies to

Here’s a list of functions that work with PercentileMode.Type:

Contribute » | Contributors: Rick de Groot