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