Duration
Unlike the Analysis Services tabular data model, the M language includes a data type for duration. The unfortunate omission of a duration data type in Analysis Services means that calculations involving duration are perhaps better handled in Power Query rather than with DAX columns or measures. However, it is also important to realize that duration
data type columns in Power Query are converted to decimal numbers when loaded into the data model. Consider the following expression:
let
Source = Duration.From("0.01:00:00"),
#"Converted to Table" = #table(1, {{Source}}),
#"Changed Type" = Table.TransformColumnTypes(#"Converted to Table",{{"Column1", type duration}})
in
#"Changed Type"
This single row table, containing a duration data type column with a value of 1 hour, when loaded into the data model becomes the value 0.0416666666666667
, which is the fractional amount of a day (1 hour/24 hours...