OpenBI Docs Buy

Text.Select

A text with only the characters you name kept: the opposite of Text.Remove.

Group: Text and characters. Power Query M has it too: a query that uses it is written as in Power BI.

Syntax

Text.Select(text as nullable text, selectChars as any) as nullable text
ParameterTypeDescription
textnullable textThe text to work on; null gives null.
selectCharsanyOne character as text, or a list of such, for example {"0".."9"}.

Returns

nullable text. The text with every other character taken out.

Examples

The digits of a phone number

Text.Select("+47 (22) 33-44", {"0".."9"})
"47223344"

Letters only

Text.Select("Oslo 0150", {"a".."z", "A".."Z"})
"Oslo"

Text.Remove, Text.ToList.

Last updated · OpenBI Studio 0.3.79