Forum Discussion
Using Power Query SDK
- Anonymous1 year ago
Hi jaryszek,
It means that Power BI Desktop does not provide a built-in API to programmatically insert or modify Power Query (.m) code inside a ".pbix" file, but using Power BI Templates (.pbit) allows you to store queries separately from data, making it easier to manage and reuse them across reports.
To integrate .pq files into a development pipeline, you can:
* Merge .pq files into a single .m script and store it in version control (e.g., Git, Azure DevOps).
* Use a ".pbit" template containing predefined queries to create reports dynamically.
* Then use PowerShell or Power BI REST API to create ".pbux" reports dynamically from the
template.
* Once the ".pbix" file is created, you can publish it automatically using the Power BI REST API or
PowerShell.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support TeamIf this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
Hi jaryszek,
As we haven’t heard back from you, so just following up to our previous message. I'd like to confirm if you've successfully resolved this issue or if you need further help.
If yes, you are welcome to share your workaround and mark it as a solution so that other users can benefit as well. If you find a reply particularly helpful to you, you can also mark it as a solution.
If you still have any questions or need more support, please feel free to let us know. We are more than happy to continue to help you.
Thank you for your patience and look forward to hearing from you.