List.Random Function of Power Query

The List.Random function returns a list of random numbers between 0 and 1, with an optional seed parameter.

Syntax

List.Random(count as number, optional seed as nullable number) as list

The function has the following parameters:

Example: Create a list of 3 random numbers.

Power Query M

let
  Source = List.Random(3)
in
  Source 

The output of the above code is shown below:

List.Random function in Power Query

Example: Create a list of 5 random numbers, specifying seed value.

Power Query M

let
  Source = List.Random(5,78)
in
  Source  

The output of the above code is shown below:

List.Random function in Power Query