Power Query M for Power BI
Clean and reshape data with Power Query M. Format a query, generate a date table in M, or start from one of 145 reusable snippets.
Power Query tools
Power Query M Code Snippets
145 snippets in 17 categories, each with the full code, notes on what it needs and related snippets. Search the whole Power Query M Code Snippets, or jump straight into a category:
- Data Cleaning 10
- Text Transformations 12
- Error Handling 6
- Data Types 13
- Row Operations 5
- Date & Time 19
- Conditional Logic 12
- Column Operations 8
- Table Transformations 15
- Merging & Appending 2
- List & Record Operations 2
- Advanced M Functions 13
- File Handling 10
- API & Web Data 6
- Performance Optimization 2
- Database & Refresh 5
- Comparing & Lookups 5
Featured snippets
The snippets other entries in the library build on or point to most often, a good place to start.