Power BI & DAX / FREE

Power Query Code Generator

Generate Power Query M patterns for cleaning, types, deduplication, merging, and appending.

Make it work with your data.

HOW TO USE IT

Power Query Code Generator

Reference an existing source query, choose an operation, and paste the generated code into a new blank query’s Advanced Editor. Give the new query a different name to avoid a circular reference.

What to know

Patterns do not execute against your data here. Merge returns a nested MergedRows column; expand it in Power Query. Text cleaning converts nonnull values to text. Type conversion uses your chosen culture and can report errors for incompatible values. Table.Distinct does not guarantee which duplicate row is retained.

← Explore all tools