Value.Multiply
Multiplies two values as the * operator does, in double or in decimal arithmetic.
Group: Values, types and errors. Power Query M has it too: a query that uses it is written as in Power BI.
Syntax
Value.Multiply(value1 as any, value2 as any, optional precision as nullable number) as any
| Parameter | Type | Description |
|---|---|---|
value1 | any | The first value: a number, or a date, time or duration. |
value2 | any | The second value. |
precision | nullable number optional | Precision.Double (the default) or Precision.Decimal. |
Returns
any. The product: a number, or a duration times a number; null when either value is null.
Remarks
- With
Precision.Decimalboth numbers are taken as the decimals Power Query shows for them (15 significant digits), the product is worked out exactly, and the answer is the number nearest to it. - A third is 0.333333333333333 as a decimal of 15 digits, so with
Precision.Decimalthree of them make 0.999999999999999, not 1.
Examples
Five shifts of seven and a half hours
Value.Multiply(#duration(0, 7, 30, 0), 5)
#duration(1, 13, 30, 0)
Three tenths as doubles and as decimals
{Value.Multiply(0.1, 3), Value.Multiply(0.1, 3, Precision.Decimal)}
{0.30000000000000004, 0.3}