Measures Concepts
GitHub icon

PowerQuery M

PowerQuery M - Query language

< >

PowerQuery M is a query language created in 2015.

#1245on PLDB 9Years Old

The Power Query M formula language is optimized for building highly flexible data mashup queries. It's a functional, case sensitive language similar to F#.


Example from the web:
"Hello World" // a text value 123 // a number 1 + 2 // sum of two numbers {1, 2, 3} // a list of three numbers [ x = 1, y = 2 + 3 ] // a record containing two fields: // x and y (x, y) => x + y // a function that computes a sum if 2 > 1 then 2 else 1 // a conditional expression let x = 1 + 1 in x * 2 // a let expression error "A" // error with message "A"
Example from the web:
let Orders = Table.FromRecords({ [OrderID = 1, CustomerID = 1, Item = "fishing rod", Price = 100.0], [OrderID = 2, CustomerID = 1, Item = "1 lb. worms", Price = 5.0], [OrderID = 3, CustomerID = 2, Item = "fishing net", Price = 25.0]}), #"Capitalized Each Word" = Table.TransformColumns(Orders, {"Item", Text.Proper}) in #"Capitalized Each Word"
PowerQuery M Keywords
as each else error false if in is let meta otherwise section shared then true try type

Language features

Feature Supported Token Example
Conditionals ✓
Booleans ✓ true false
MultiLine Comments ✓ /* */
/* A comment
*/
Strings ✓ "
Comments ✓
// A comment
Line Comments ✓ //
// A comment
Semantic Indentation X

View source

- Build the next great programming language · Search · Add Language · Features · Creators · Resources · About · Blog · Acknowledgements · Queries · Stats · Sponsor · Day 605 · feedback@pldb.io · Logout