Duration.Minutes
DurationReturns the minutes component from a duration value.
Syntax
Duration.Minutes(duration as nullable duration) as nullable numberParameters
| Name | Type | Required | Description |
|---|---|---|---|
duration | duration | Yes | The duration value to extract the minutes component from. |
Return Value
number — The 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 | |
|---|---|---|---|
| 1 | L002 | 1,725 | 45 |
| 2 | L004 | 2,745 | 45 |
| 3 | L006 | 1,065 | 45 |
| 4 | L008 | 2,670 | 30 |
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 | |
|---|---|---|
| 1 | 1.08:25:30 | 25 |
Compatibility
✓ Power BI Desktop✓ Power BI Service✓ Excel Desktop✓ Excel Online✓ Dataflows✓ Fabric Notebooks