Uri.BuildQueryString

Updated on

Uri.BuildQueryString is a Power Query M function that assembles a record query into a URI query string, escaping characters as necessary. The function returns a properly formatted and escaped URI query string based on the input record.

Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365

Syntax

Uri.BuildQueryString( query as record ) as text

Description

Assemble the record query into a URI query string, escaping characters as necessary.

Examples

Encode a query string which contains some special characters.

// Output: "a=1&b=%2B%24"
Uri.BuildQueryString( [a = "1", b = "+$"] )

Other functions related to Uri.BuildQueryString are:

Contribute » | Contributors: Rick de Groot
Microsoft documentation: https://learn.microsoft.com/en-us/powerquery-m/uri-buildquerystring