Power Query 在Excel2010和2013中是以插件形式存在的,Excel2016中已经内置这一功能了,其可见微软对其的重视。 值得欣慰的是,PQ不仅为我们快速导入不同数据源数据提供便利,也为我们提供了一系列新的函数,PQ中的公式简称为M公式,与PowerPivot中的DAX表达式是两兄弟。
Power Query (informally known as "M") formula categories
This topic applies to the Power Query Formula Language which can be used with Power Query and Power BI Desktop to build queries that mashup data. See the list of function categories.
About
The following tables describe the Power Query formula categories that can be used to manually create or modify queries. These formula functions can also be used in the Power BI Designer, in the Query view.
Returns the text representation of a number, date, time, datetime, datetimezone, logical, duration or binary value. If a value is null, Text.From returns null. The optional culture parameter is used to format the text value according to the given culture.
Text.FromBinary
Decodes data from a binary value in to a text value using an encoding.
Text.NewGuid
Returns a Guid value as a text value.
Text.ToBinary
Encodes a text value into binary value using an encoding.
Text.ToList
Returns a list of characters from a text value.
Value.FromText
Decodes a value from a textual representation, value, and interprets it as a value with an appropriate type. Value.FromText takes a text value and returns a number, a logical value, a null value, a DateTime value, a Duration value, or a text value. The empty text value is interpreted as a null value.
Returns a text value with newValue inserted into a text value starting at a zero-based offset.
Text.Remove
Removes all occurrences of a character or list of characters from a text value. The removeChars parameter can be a character value or a list of character values.
Text.RemoveRange
Removes count characters at a zero-based offset from a text value.
Text.Replace
Replaces all occurrences of a substring with a new text value.
Text.ReplaceRange
Replaces length characters in a text value starting at a zero-based offset with the new text value.