List.Times

Updated on

List.Times is a Power Query M function that creates a list of time values with a specified size, starting point, and incremental step. The function returns a list containing the generated time values.

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

Syntax

List.Times(
   start as time,
   count as number,
   step as duration,
) as list

Description

Returns a list of time values of size count, starting at start. The given increment, step, is a duration value that is added to every value.

Examples

Create a list of 4 values starting from noon ( #time( 12, 0, 0 ) ) incrementing by one hour ( #duration( 0, 1, 0, 0 ) ).

List.Times( #time( 12, 0, 0 ), 4, #duration( 0, 1, 0, 0 ) )

 /* Output: 
{
    #time( 12, 0, 0 ),
    #time( 13, 0, 0 ),
    #time( 14, 0, 0 ),
    #time( 15, 0, 0 )
}
 */ 

Other functions related to List.Times are:

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

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