Skip to main content

Menu

LEVEL 0
0/5 XP
HomeAboutTopicsPricingMy VaultStatsPractice TestsCertifications

Categories

🎓 Certifications
🤖 Artificial Intelligence
☁️ Cloud and Infrastructure
💾 Data and Databases
💼 Professional Skills
🎯 Programming and Development
🔒 Security and Networking
📚 Specialized Topics
CheatGrid
HomeAboutTopicsPricingMy VaultStatsPractice TestsCertifications
LVLEVEL 0
0/5 XP
GitHub
© 2026 CheatGrid™. All rights reserved.
Privacy PolicyTerms of UseAboutContact

M Language (Power Query Formula) Cheat Sheet

M Language (Power Query Formula) Cheat Sheet

Back to Business Intelligence
Updated 2026-05-26
Next Topic: Marketing Analytics and Attribution Modeling Cheat Sheet

M Language (Power Query Formula Language) is a functional, case-sensitive mashup language used in Microsoft Power Query for data transformation and preparation across Power BI, Excel, Microsoft Fabric, and other Microsoft platforms. Built on a let-in expression structure, M enables powerful ETL operations including filtering, combining, and reshaping data from diverse sources. Understanding M's query folding capability—where transformations are pushed to the data source—is critical for performance, while its lazy evaluation, extensive function library (700+ functions), and composable custom-function model provide the flexibility to solve virtually any data-preparation challenge.

What This Cheat Sheet Covers

This topic spans 28 focused tables and 374 indexed concepts. Below is a complete table-by-table outline of this topic, spanning foundational concepts through advanced details.

Table 1: Language FundamentalsTable 2: Data TypesTable 3: OperatorsTable 4: Conditional LogicTable 5: Error HandlingTable 6: Type ConversionTable 7: Text FunctionsTable 8: Number FunctionsTable 9: Date FunctionsTable 10: Time and Duration FunctionsTable 11: List FunctionsTable 12: Table Construction and InformationTable 13: Table Column OperationsTable 14: Table Row OperationsTable 15: Table Sorting, Grouping, and RankingTable 16: Table Combining and JoiningTable 17: Table RestructuringTable 18: Custom FunctionsTable 19: Record FunctionsTable 20: Data Source ConnectorsTable 21: JSON and XML ParsingTable 22: Performance and Query FoldingTable 23: Advanced PatternsTable 24: Splitter and Combiner FunctionsTable 25: Comparer FunctionsTable 26: Null and Missing Value HandlingTable 27: Type System FunctionsTable 28: Uri and Lines Functions

Table 1: Language Fundamentals

The building blocks every M query is made of: the let-in structure, identifier rules, the each/_ shorthand, comments, and the null value. Mastering these is the prerequisite for reading and writing any M code.

ConceptExampleDescription
let-in expression
let
Source = 1,
Result = Source + 1
in
Result
• Core syntactic structure: variables defined after let, final output after in
• every query uses this pattern
each keyword
List.Transform({1,2,3}, each _ * 2)
• Shorthand for (_) => ...
• single-parameter lambda used throughout the standard library
underscore (_) iterator
Table.SelectRows(data, each [Sales] > 100)
Represents the current item in an each context — current row, list item, or value
null value
if [Column] = null then 0 else [Column]
• Represents absence of value — distinct from empty string or zero
• requires explicit = null comparison
case sensitivity
Text.Upper("abc")
text.upper("abc") // error
• All identifiers, keywords, and function names are case-sensitive
• Text.Upper ≠ text.upper

More in Business Intelligence

  • Looker Studio Cheat Sheet
  • Marketing Analytics and Attribution Modeling Cheat Sheet
  • Agentic Analytics and AI Copilots in BI Cheat Sheet
  • Data Storytelling Cheat Sheet
  • IBM Cognos Analytics Cheat Sheet
  • QlikView Cheat Sheet
View all 61 topics in Business Intelligence