Percentage.From

Number

Converts a value to a percentage number type.

Examples on this page use shared sample tables. View them to understand the input data before reading the examples below.

Syntax

Percentage.From(value as any, optional culture as nullable text) as nullable number

Parameters

NameTypeRequiredDescription
valueanyYesThe value to convert. Accepts number, text, logical, or null.
culturetextNoAn optional culture string for locale-aware parsing of text values.

Return Value

numberA number typed as a percentage.

Remarks

Percentage.From converts a value to the percentage data type. The underlying numeric value is stored as a standard decimal — 0.25 represents 25%, 1.0 represents 100%. The percentage type is primarily a display annotation: it signals to the host application (such as Power BI Desktop) that values should be formatted with a % suffix and scaled appropriately in visuals and data labels. The raw stored value does not change.

This distinction is important: if you have a column where 25 should represent 25%, you must first divide by 100 and then apply Percentage.From. If you have a column already storing 0.25 for 25%, you can apply Percentage.From directly. The function does not perform any scaling — it only changes the type annotation.

When converting from text, behavior depends on the environment: some locales recognize "25%" as 0.25, while others treat it as 25. To avoid ambiguity, normalize text percentages to decimal form before converting. Logical true converts to 1 (100%), false to 0, and null returns null. To apply percentage type to an entire column, use Table.TransformColumnTypes with Percentage.Type.

Examples

Example 1: Annotate a ratio as percentage type

Percentage.From(0.25)
Result
Result
10.25

Example 2: Parse a decimal text string as percentage

Percentage.From("0.75")
Result
Result
10.75

Example 3: Compute market share and annotate as percentage

let
    TotalQty = List.Sum(Sales[Quantity]),
    WithShare = Table.AddColumn(
        Table.SelectColumns(Table.FirstN(Sales, 4), {"OrderID", "CustomerName", "Quantity"}),
        "MarketShare",
        each Percentage.From([Quantity] / TotalQty),
        Percentage.Type
    )
in
    WithShare
Applied Steps

The final output — the four-column table showing each order's ID, customer, quantity, and percentage share of total quantity.

OrderID
CustomerName
Quantity
MarketShare
11Alice40.17
22Bob20.09
33Charlie100.43
44Alice10.04

Compatibility

Power BI Desktop Power BI Service Excel Desktop Excel Online Dataflows Fabric Notebooks