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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
MR3110
Regular Visitor

How to connect & import Mongodb database with powerbi

Hi All,

 

I need to know how to import mongodb database in powerbi,

please share me step by step guide to connect with mongodb

 

Thanks

Mohanraj

5 REPLIES 5
Anonymous
Not applicable

Hi @MR3110 ,

Based on the error description, try to check if sample_mflix table is present in the sample_mflix data base. You should enter the table name in the native query.

vjiewumsft_0-1725868173104.png

You can also view the following document to learn more information.

MongoDB Atlas SQL interface connector - Power Query | Microsoft Learn

 

Best Regards,

Wisdom Wu

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

MR3110
Regular Visitor

Thanks,

Now I can connect PowerBI with MongoDB.

But how could i filter the database before importing. I tried to filter database using sql query but its not working. 

 

MR3110_1-1725695372550.png

 

 

Below is the screenshot of an error

 

MR3110_3-1725695638405.png

 

sqqwe6
New Member

Connecting MongoDB to Power BI: A Step-by-Step Guide

Prerequisites:

  • MongoDB Instance: Ensure you have a running MongoDB instance with your desired data.
  • Power BI Desktop: Download and install the latest version of Power BI Desktop.
  • Power BI Data Source: Install the "MongoDB" data source from the Power BI Marketplace.

Steps:

  1. Open Power BI Desktop: Launch Power BI Desktop.
  2. Get Data:
    • Click on the "Get Data" button in the Home tab.
    • Choose "More sources" from the dropdown.
  3. Select MongoDB:
    • Scroll down and select the "MongoDB" data source.
    • Click "Connect".
  4. Enter Server Name and Database:
    • In the "Server Name" field, enter the IP address or hostname of your MongoDB server.
    • In the "Database Name" field, specify the name of the database you want to connect to.
      you can check the innovative cbd for info related to the cbd
  5. Authentication (Optional):
    • If your MongoDB server requires authentication, provide the username and password in the respective fields.
  6. Test Connection:
    • Click "Test Connection" to verify if you can connect to the MongoDB server and database.
  7. Choose Data Source:
    • Select the appropriate data source type (e.g., collection, view, etc.) based on your requirements.
  8. Import Data:
    • Click "Load" to import the data from the MongoDB collection into Power BI.

Additional Tips:

  • Querying Data: You can use MongoDB query syntax to filter and shape the data before importing it into Power BI.
  • Relationships: If you have multiple collections or views, you can establish relationships between them in Power BI to create a data model.
  • Data Transformation: Use Power BI's data transformation capabilities to clean, prepare, and enrich your MongoDB data.

Example Query:

If you want to import data from a collection named "customers" with a specific filter, you can use a query like:

{
    "find": "customers",
    "filter": {
        "country": "USA"
    }
}

By following these steps, you can successfully connect your MongoDB database to Power BI and leverage its powerful visualization and analysis tools.

PijushRoy
Super User
Super User

Hi @MR3110 

Please  check out this link - https://www.mongodb.com/docs/atlas/tutorial/connect-bic-powerbi/
Video - https://www.youtube.com/watch?v=2_uFlLYjKhk 




Did I answer your question? Mark my post as a solution!
Appreciate your Like/Kudos

Proud to be a Super User!





Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.