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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
keinshah
Helper I
Helper I

undefinedPower BI error NULL

Hello community,

 

I have my data source as MS business central. When I refresh on desktop, it works fine without any errors. However, when scheduled refresh or manual refresh online, it returns the below error.

 

Data source error: Expression.Error: The OData connector failed with the following error: We cannot convert the value null to type Record... . The exception was raised by the IDbCommand interface. Table: LotNoInformationList.
Cluster URI: WABI-UK-SOUTH-B-PRIMARY-redirect.analysis.windows.net
Activity ID: 50d92772-e7ba-4953-8dd1-dd60c4ec3044
Request ID: d9f0b6f9-b3c6-1882-5d96-93f34fb03110
Time: 2024-09-03 15:35:47Z

 

keinshah_0-1725379365175.png

 

Similar error on all my reports with various datasets. This triggered today morning onwards.

 

I did try to remove the 'null' from the dataset, but still the error persists.

 

Any tips on how to resolve it?

 

 

Many thanks.

 

1 ACCEPTED SOLUTION

The latest version of the connector no longer permits the 4th parameter to be null.

Please try the following solution:

Before:
Dynamics365BusinessCentral.ApiContentsWithOptions(null, null, null, null)

After:
Dynamics365BusinessCentral.ApiContentsWithOptions(null, null, null, [UseReadOnlyReplica = null])

View solution in original post

52 REPLIES 52

This worked. Thank you so much.

It worked - Thank you so much!!!!!

 

How do I change that and where from please?

In your powerbi desktop report > Transform data > select and highlight your Business Central related query > open Advanced editor > replace the first line as described above > Ok > Close & Apply once updated to all BC related queries

In Power BI desktop reports > transform data>
I can't open the advanced editor when multiple queries are selected. The advanced editor option is greyed out. How do you access the advanced editor with multiple queries selected?

Unfortunately, you will need to edit each query one-by-one as each queries code in advanced editor can be different.

I did remove all NULL values manually. But still it is not working. Let me know if you manage to solve the issue.

Before:
Dynamics365BusinessCentral.ApiContentsWithOptions(null, null, null, null)

After:
Dynamics365BusinessCentral.ApiContentsWithOptions(null, null, null, [UseReadOnlyReplica = null])

Ianc33
Frequent Visitor

I'm getting the same error and it is only from reports that use Business Central as the data source.

Can you post the error?

yes, Same here. 

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.