OpenBI Docs Buy

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
ParameterTypeDescription
value1anyThe first value: a number, or a date, time or duration.
value2anyThe second value.
precisionnullable 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.Decimal both 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.Decimal three 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}

Value.Divide, Value.Add, List.Product.

Last updated · OpenBI Studio 0.3.79