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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
tariqpervez
Regular Visitor

Error in connecting Power BI to Fleet API

I have a situation where I am trying to extract distance data of fleets through Fleet company's web API service. I am done with API authentication from where I got a ClientID, UserID & Token. Now using this information, I am trying to make  API calls from power bi. Below are the snapshots of steps which I followed; 

tariqpervez_0-1647445513412.png

 

when the API call completes it shows null in data and an error

tariqpervez_1-1647445513362.png

 

I have further expanded the error below. It says that "TotalDistance" property in "Distance" report cannot be set to a System.Decimal value it should be set to a non-null value of type System.Double

tariqpervez_2-1647445513696.png

 

apart from this, I have tried making calls from their web API service portal and it runs fines and gives responses in JSON. Below is the snapshot of that 

 

tariqpervez_3-1647445513436.png

 

 

tariqpervez_4-1647445513537.png

 

 

Please provide your valuable feedback on this problem.

3 REPLIES 3
tariqpervez
Regular Visitor

Please find below zoomed snapshots

tariqpervez_0-1647573687734.png

 

 

tariqpervez_1-1647573838297.png

 

tariqpervez_2-1647573911985.png

 

 

Anonymous
Not applicable

HI @tariqpervez,

Perhaps you can take a look at the following blog to change the function usage with 'relativepath' and 'query' options if helps:

Chris Webb's BI Blog: Using The RelativePath And Query Options With Web.Contents() In Power Query An...

In addition, the error message seems to mention a property can't be set to null. I'd like to suggest you also add that with non-null double type default value to the query.

Regards,

Xiaoxin Sheng

lbendlin
Super User
Super User

the screenshots are too small to read. Show sample code where you supply the "TotalDistance"  parameter.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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