Duration.Minutes

Duration

Returns the minutes component from a duration value.

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

Syntax

Duration.Minutes(duration as nullable duration) as nullable number

Parameters

NameTypeRequiredDescription
durationdurationYesThe duration value to extract the minutes component from.

Return Value

numberThe minutes component (0 through 59).

Remarks

Duration.Minutes returns the minutes component (0 through 59) from a duration value. This is the minute portion after removing whole days and hours. If the input is null, the function returns null.

Examples

Example 1: Extract minutes from OrderLog durations

Table.AddColumn(
    Table.SelectColumns(
        Table.SelectRows(
            OrderLog,
            each [DurationMinutes] <> null
        ),
        {"LogID", "DurationMinutes"}
    ),
    "MinutesPart",
    each Duration.Minutes(#duration(0, 0, [DurationMinutes], 0)),
    Int64.Type
)
Result
LogID
DurationMinutes
MinutesPart
1L0021,72545
2L0042,74545
3L0061,06545
4L0082,67030

Example 2: Extract minutes from a scalar duration

#table(
    type table [Duration = duration, Minutes = number],
    {{#duration(1, 8, 25, 30), Duration.Minutes(#duration(1, 8, 25, 30))}}
)
Result
Duration
Minutes
11.08:25:3025

Compatibility

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