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

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

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
October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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 Kudoed Authors