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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Albert_Benjamin
New Member

Missing Values from Mongo DB

I am trying to load data into BI using MongoDB Atlas. However, in one particular collection, the first few hundred documents are missing some fields that were added later to the newer documents in the database. As a result, I'm unable to fetch those missing fields when loading the data.

1 ACCEPTED SOLUTION
v-hashadapu
Community Support
Community Support

Hi @Albert_Benjamin , Thank you for reaching out to the Microsoft Community Forum.

 

When loading data from MongoDB Atlas into Power BI, older documents may lack newer fields, causing schema inconsistency. Since MongoDB is schema less and Power BI infers the schema based on sampled documents, missing fields won't appear unless you actively handle them.

 

If you have access to MongoDB Atlas (even read-only), the best non-invasive approach is to create a view that ensures every document contains all expected fields, setting missing ones as null. Views are BI-friendly and avoid modifying your source data. In Power BI, connect to this view instead of the original collection. Now all documents will have a consistent schema and all fields will load correctly even if their values are sometimes null. If you cannot create a view, you can fix missing fields after loading your collection into Power BI. In Power Query Editor, manually add columns for the missing fields, defaulting them to null where they are missing. This ensures all your Power BI tables have the necessary fields for modelling and reporting, even if older documents didn’t have them initially.

 

If you have write access to the MongoDB collection and want a permanent solution, you can update all older documents to add the missing fields directly, assigning them a default value like null. Though Make sure to back up your data first. This way, all documents natively have a consistent structure before Power BI loads them, reducing the need for complex transformations later.

Views - Mongo DB

db.collection.updateMany()

 

If this helped solve the issue, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.

View solution in original post

4 REPLIES 4
v-hashadapu
Community Support
Community Support

Hi @Albert_Benjamin , Please let us know if your issue is solved. If it is, consider marking the answer that helped 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
Thank you.

v-hashadapu
Community Support
Community Support

Hi @Albert_Benjamin , Please let us know if your issue is solved. If it is, consider marking the answer that helped 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
Thank you.

v-hashadapu
Community Support
Community Support

Hi @Albert_Benjamin , Please let us know if your issue is solved. If it is, consider marking the answer that helped 'Accept as Solution', so others with similar queries can find it easily. If not, please share the details.
Thank you.

v-hashadapu
Community Support
Community Support

Hi @Albert_Benjamin , Thank you for reaching out to the Microsoft Community Forum.

 

When loading data from MongoDB Atlas into Power BI, older documents may lack newer fields, causing schema inconsistency. Since MongoDB is schema less and Power BI infers the schema based on sampled documents, missing fields won't appear unless you actively handle them.

 

If you have access to MongoDB Atlas (even read-only), the best non-invasive approach is to create a view that ensures every document contains all expected fields, setting missing ones as null. Views are BI-friendly and avoid modifying your source data. In Power BI, connect to this view instead of the original collection. Now all documents will have a consistent schema and all fields will load correctly even if their values are sometimes null. If you cannot create a view, you can fix missing fields after loading your collection into Power BI. In Power Query Editor, manually add columns for the missing fields, defaulting them to null where they are missing. This ensures all your Power BI tables have the necessary fields for modelling and reporting, even if older documents didn’t have them initially.

 

If you have write access to the MongoDB collection and want a permanent solution, you can update all older documents to add the missing fields directly, assigning them a default value like null. Though Make sure to back up your data first. This way, all documents natively have a consistent structure before Power BI loads them, reducing the need for complex transformations later.

Views - Mongo DB

db.collection.updateMany()

 

If this helped solve the issue, please consider marking it 'Accept as Solution' so others with similar queries may find it more easily. If not, please share the details, always happy to help.
Thank you.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors