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
RohitClouds
New Member

Data Conversion Error: Value of Type Binary Cannot be Converted to Type Record

Expression.Error: Incompatible Types - Unable to convert Binary to Record. The provided value [Binary] cannot be transformed into the expected type [Type].

RohitClouds_0-1690814863829.png

 

My code is:

---------------------------------

let

Credentials = "Username:Password",
AuthKey = "Basic " & Binary.ToText(Text.ToBinary(Credentials), BinaryEncoding.Base64),
url = "https://xxxxxxxxxxxxxxxxxxxxx.io/api/v1/product_bundle_index",
headers = [
#"Authorization"=AuthKey,
#"Content-Type" = "application/x-www-form-urlencoded",
#"Accept" = "application/json"
],
//postData = "{""order_id"":""[11931]""}",
record = [order_id = "11931"],
postData = Json.FromValue(record),
response = Json.Document(Web.Contents(url, postData))

in
// jsonResponse
response

 

 

2 REPLIES 2
Legend_11
Resolver I
Resolver I

I am trying to fetch the data using POST API. Whenever try to retrive the the data from query it is giving me an error "Expression Error: We cannot convert a value of type Binary to type Record"

Helpful resources

Announcements
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.

June 2025 community update carousel

Fabric Community Update - June 2025

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