Forum Discussion
Publish Power Query Source tables to Report View
- 1 year ago
Hi satishorre20 ,
To publish Power Query source and transformation metadata as a data dictionary in Power BI, you can follow a semi-automated approach using pbi-tools. First, save your Power BI file as a .pbip project (you can enable this from the Preview features in Power BI Desktop), or export it as a .pbit template. Then, install and run pbi-tools (Welcome to pbi-tools | pbi-tools an open-source command-line utility) to extract the Power Query M code from your project. This will give you all your queries in individual .m files inside a folder. From each file, you can manually extract useful metadata such as the query name, source type (like SQL Server or Excel), the original source object (like dbo.FactSales), and each transformation step (such as filtering, renaming, or merging).
Once you collect this information, organize it into a structured table (e.g., using Excel or CSV) with columns like: Query Name, Source Type, Source Table, Step Name, and Transformation Description. Load this table into Power BI as a regular data table. You can then build a data dictionary report that displays the lineage and applied steps of each query in an easy-to-read format using table visuals, slicers, and filters. Optionally, you can combine this with INFO.VIEW.COLUMNS() or INFO.VIEW.TABLES() to connect your Power Query metadata with the final model columns for a full end-to-end documentation view.
If this post helps, then please consider Accepting as solution to help the other members find it more quickly.
Thank you.
Hi Akash_Varuna / v-venuppu , Thank you for the quick response on this. I need to check how we can extract from source object to Query with multiple transformation Applied steps in Power Query and publish metadata as a query in Power BI Model View. So we can publish the logic in Data Dictionary. I am still looking into it.
Thank you again for your suggestions.
Satish