Power BI is turning 10, and we’re marking the occasion with a special community challenge. Use your creativity to tell a story, uncover trends, or highlight something unexpected.
Get startedJoin us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.
hi Guys,
1. I have a multiple connectors as *.pq files and want to import them into power bi desktop automatically (not manually one by one) and use in power bi service.
I want to use cloud data, not my personal gateway.
How to make this?
2. How to create parameters for connector and dynamically change them after importing connector using rest api for changing parameters? https://learn.microsoft.com/en-us/rest/api/power-bi/datasets/update-parameters
this is a call for changing parameters.
Thank you for help,
Best
Jacek
Solved! Go to Solution.
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 Team
If this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
Hi @jaryszek,
May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.
Thank you.
Hi @jaryszek,
I wanted to check if you had the opportunity to review the information provided. Please feel free to contact us if you have any further questions. If my response has addressed your query, please accept it as a solution so that other community members can find it easily.
Thank you.
Hello,
sorry but problem is not solved.
Hi @jaryszek,
Could you please tell me what and where exactly you are facing an issue with or is the issue mentioned in original question still persist?
Thank you
With pleasure:
"Power BI Desktop does not have native APIs for direct .m code injection. But, after merging the files into a single .m script, we can use Power BI Template Files (.pbit) which store queries separately from data."
What does it mean? How can i use pqfiles with development pipeline?
Best,
Jacek
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 Team
If 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.
Hi @jaryszek,
Thanks for reaching out to the Microsoft fabric community forum.
It looks like you want to automate the import of multiple ".pq" Files into Power BI Desktop & Service. You can merge all .pq files into a single .m script automatically using powershell. As for creating parameters & dynamically changing them, you can add new parameters and update them using REST API.
I would also take a moment to thank @lbendlin, for actively participating in the community forum and for the solutions you’ve been sharing in the community forum. Your contributions make a real difference.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support Team
If this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
Thank you.
Before I close the topic:
"You can merge all .pq files into a single .m script automatically using powershell."
How after merging code using powershell put it into power BI Desktop? Do you have any code examples?
Best,
Jacek
Hi @jaryszek,
Power BI Desktop does not have native APIs for direct .m code injection. But, after merging the files into a single .m script, we can use Power BI Template Files (.pbit) which store queries separately from data.
If I misunderstand your needs or you still have problems on it, please feel free to let us know.
Best Regards,
Hammad.
Community Support Team
If this post helps then please mark it as a solution, so that other members find it more quickly.
Thank you.
thank you.
If i would have template file, can i use it for building pwoer bi reports with queries sitting there?
Best Wishes,
Jacek
Hi @jaryszek,
Yes, you can use a Power BI Template to build new reports while keeping the queries intact.
Thank you.
Custom connectors mandate the use of a gateway, either personal or standard/enterprise. Even if they connect to cloud sources.
This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.
Check out the June 2025 Power BI update to learn about new features.
User | Count |
---|---|
15 | |
11 | |
8 | |
8 | |
7 |
User | Count |
---|---|
15 | |
13 | |
9 | |
7 | |
6 |