Microsoft Fabric Community Conference 2025, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount.
Register nowHi,
i have a lot of power queries *.pq files created in Power Query SDK.
How to import M Code from all of them as separated queries into Power Bi Desktop?
So i have Query1, Query2, Query 3 M code tested and checked in power Query SDK.
Now i want to get them in Power Query editor in Power BI with the same M code (replace or create new power queries while importing).
How to do this?
Best,
Jacek
Solved! Go to Solution.
I solve the case!!
To programmatically interact with power queries you can modify existing M code using TMDL approach:
https://powerbi.microsoft.com/en-us/blog/tmdl-in-power-bi-desktop-developer-mode-preview/
Best,
Jacek
Hi jaryszek,
Thank you for your valuable feedback. We understand that the lack of an automated solution poses a challenge, and we sincerely appreciate the efforts invested in exploring possible alternatives. While there is no officially documented method to automate this process, we encourage staying updated with Power BI developments and actively engaging in community forums, where new tools or solutions may be introduced.
In the meantime, if a feasible solution is discovered, we would appreciate it if it could be shared with the community, as it may benefit others facing similar challenges.We appreciate the patience and understanding.
Thank you.
Hi jaryszek,
We are following up to see if your query has been resolved. Should you have identified a solution, we kindly request you to share it with the community to assist others facing similar issues.
If our response was helpful, please mark it as the accepted solution and provide kudos, as this helps the broader community.
Thank you.
I solve the case!!
To programmatically interact with power queries you can modify existing M code using TMDL approach:
https://powerbi.microsoft.com/en-us/blog/tmdl-in-power-bi-desktop-developer-mode-preview/
Best,
Jacek
thanks! Query is not resolved yet because there is no option to automate the process.
Looking for solution - if I will find it - i will close the topic.
Best,
Jacek
Hi jaryszek,
Thank you for your acknowledgment.
Based on my research, I have not found any official documentation to automate the process using PowerShell or any other programming language. As an alternative, we can proceed with the proposed solution.
If you have discovered a method to automate the process, we kindly request you to share it with the community to assist others facing similar challenges.
If you find our response helpful, we kindly request you to mark it as the accepted solution and provide kudos. This will assist other community members encountering similar queries.
We appreciate your inquiry through the Microsoft Fabric Community Forum.
To successfully import multiple Power Query (.pq) files into Power BI Desktop as separate queries, please follow the steps outlined below as a potential solution:
Additionally, if you find our response helpful, kindly mark it as the accepted solution and provide kudos. This will assist other community members encountering similar queries.
Thank you.
Thank you very much.
There is no powerShell or different language to automate process?
Best,
Jacek
when you use a custom connector, you reference the contents of the connector. Because of this behavior, it is different from pasting code.
If you use Power Query in Excel, you can add code using VBA, VSTO..., but it may be difficult or impossible to do it in PowerBI.
Hello,
thanks!
Why this is making difference what kind of M code i have?
let
Source = #table({"Name", "Age"}, {
{"Alice", 25},
{"Bob", 30},
{"Charlie", 35}
})
in
Source
example 2:
let
Source = #table({"Product", "Price"}, {
{"Laptop", 1000},
{"Phone", 600},
{"Tablet", 400}
}),
AddedColumn = Table.AddColumn(Source, "Discounted Price", each [Price] * 0.9)
in
AddedColumn
Mez file:
section Section1;
shared MyQuery =
let
Source = #table({"Product", "Price"}, {
{"Laptop", 1000},
{"Phone", 600},
{"Tablet", 400}
}),
AddedColumn = Table.AddColumn(Source, "Discounted Price", each [Price] * 0.9)
in
AddedColumn;
Best,
Jacek
March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!
Check out the February 2025 Power BI update to learn about new features.
If you love stickers, then you will definitely want to check out our Community Sticker Challenge!
User | Count |
---|---|
30 | |
23 | |
18 | |
15 | |
11 |