Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
peeyee
New Member

How to load a package by M

Hi, support team:

 

Does M have the  ability to load a package(written by other languages)?

I've searched through the docs, but didn't find any relevant information.

 

5 REPLIES 5
v-mdharahman
Community Support
Community Support

Hi @peeyee,

We haven’t heard back from you for some time, so just following up to our previous message. We hope your issue has been resolved.

If the solution we provided has worked for you, kindly mark it as the accepted solution. Your feedback is important to us, Looking forward to your response. 

 

Thank you for being a valued member of the Microsoft Fabric Community Forum!

v-mdharahman
Community Support
Community Support

Hi @peeyee,

As we haven’t heard back from you, so just following up to our previous message. We hope your issue has been resolved.

If the solution we provided has worked for you, kindly mark it as the accepted solution. Your feedback is important to us, Looking forward to your response. 

 

Thank you for being a valued member of the Microsoft Fabric Community Forum!

v-mdharahman
Community Support
Community Support

Hi @peeyee,
Thanks for reaching out to the Microsoft fabric community forum.

As the query is for a way to load any external package in M-Query, there is no direct way to load any external packages or libraries written in other programming languages like Python, R, C#.


If you still need any functionality from another language, Power BI allows you to include Python or R scripts as part of your queries using which you can execute Python or R code to process data and then bring the results into Power Query.

For more details on this you can refer to the following links -

https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-python-scripts

https://learn.microsoft.com/en-us/power-bi/connect-data/desktop-r-scripts

 

You can also use APIs, if the external functionality is exposed through REST API. We use "Web.Contents" function to implement API integration in M-Query. This fucntion sends HTTP requests and retrieves responses in JSON, XML, or other formats.

 

If this post helps, then please consider Accept it as the solution and give a Kudos to help the other members find it more quickly. If you have any other queries you can reach out to community forum for assistance.

Thank you. 

Omid_Motamedise
Super User
Super User

Just Python, R and Java Script

for the others you might have to use api for sending the table and apply that code and then recive the result table (based on the language type)

BIBB
Helper I
Helper I

No, not really, at least you can not importa a library in Power BI desktop in the same way you use npm to install JS packages. 

The closest you can get is a working with Py or R in Power BI desktop or loadin a Power Query Function Gallery, athough this has its limitations. For a very good sample visit this M Function Gallery GitHub repository.  

 

https://github.com/OscarValerock/PowerQueryFunctions

Power BI desktop can run Py and R Scripts, but not all libraries are compatible. 

Learn which Python packages are supported - Power BI | Microsoft Learn

Learn which R packages are supported - Power BI | Microsoft Learn

 

Finally, you can embedd Power BI components into an application using different frameworks like React. 
How to embed a Power BI item in a React app | Microsoft Learn

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

Find out what's new and trending in the Fabric community.