Percentage.From is a Power Query M function that converts a given value to a percentage. The function returns the percentage value as a number, considering an optional culture.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
Percentage.From(
value as any,
optional culture as nullable text,
) as nullable number
Description
Returns a percentage
value from the given value
. If the given value
is null
, Percentage.From
returns null
. If the given value
is text
with a trailing percent symbol, then the converted decimal number will be returned. Otherwise, the value will be converted to a number
using Number.From
. An optional culture
may also be provided (for example, “en-US”).
Examples
Get the percentage
value of "12.3%"
.
// Output: 0.123
Percentage.From( "12.3%" )
Related functions
Other functions related to Percentage.From are:
- Byte.From
- Currency.From
- Decimal.From
- Double.From
- Int16.From
- Int32.From
- Int64.From
- Int8.From
- Number.From
- Number.FromText
- Number.ToText
- Single.From
