List.Covariance

Updated on

List.Covariance is a Power Query M function that computes the covariance between two lists of numbers, which must have the same number of values. The function returns the calculated covariance value.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

List.Covariance(
   numberList1 as list,
   numberList2 as list,
) as nullable number

Description

Returns the covariance between two lists, numberList1 and numberList2. numberList1 and numberList2 must contain the same number of number values.

Examples

Calculate the covariance between two lists.

// Output: 0.66666666666666607
List.Covariance( {1, 2, 3}, {1, 2, 3} )

Other functions related to List.Covariance are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/list-covariance

2023-2024 © BI Gorilla. All rights are reserved. Information from Microsoft docs is property of Microsoft Corp. | Privacy Policy