List.Durations

List

Generates a list of duration values starting from a given duration, with a specified count and step.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

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

Parameters

NameTypeRequiredDescription
startdurationYesThe starting duration value.
countnumberYesThe number of duration values to generate.
stepdurationYesThe duration increment to add between each successive value.

Return Value

listA list of duration values of length count, beginning at start and incrementing by step.

Remarks

List.Durations generates a sequence of duration values — each representing a span of time as days, hours, minutes, and seconds. The values are created using the #duration(days, hours, minutes, seconds) literal syntax.

This function is useful for building SLA threshold buckets, generating time interval labels, or producing elapsed-time checkpoints for scheduling analysis. Unlike calendar-based intervals (days, months), duration arithmetic is exact: there are no irregularities from leap years or variable month lengths.

A count of 0 returns an empty list; negative counts cause an error. The start value defines the first duration in the sequence; step defines the increment. Both can be zero (to start from zero duration) or negative (to generate decreasing durations). The resulting list can be transformed to text using Duration.ToText or manipulated with other duration functions like Duration.Hours and Duration.TotalHours.

Examples

Example 1: Generate hourly durations for 5 hours

List.Durations(#duration(0, 0, 0, 0), 5, #duration(0, 1, 0, 0))
Result
Result
10:00:00
21:00:00
32:00:00
43:00:00
54:00:00

Example 2: Generate durations in 30-minute steps

List.Durations(#duration(0, 8, 0, 0), 6, #duration(0, 0, 30, 0))
Result
Result
18:00:00
28:30:00
39:00:00
49:30:00
510:00:00
610:30:00

Example 3: Daily increments starting from 1 day

List.Durations(#duration(1, 0, 0, 0), 5, #duration(1, 0, 0, 0))
Result
Result
11.00:00:00
22.00:00:00
33.00:00:00
44.00:00:00
55.00:00:00

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks