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
mradzi87
Regular Visitor

We cannot convert a value of type Record to type Number

I'm a beginner with power query and I've been working on this code to pull an entity by invoking the entityID.

When I enter the entity ID, I'm getting an error. Appreciate all the help that I can get from the community

 

An error occurred in the ‘’ query. Expression.Error: We cannot convert a value of type Record to type Number.
Details:
Value=[Record]
Type=[Type]

 

Here is the code that I have produced and there was no syntax error.

 

(entityIds as text) as table =>

let
Source = Json.Document(Web.Contents("https://xxxx.com/xxxx/xxxxx",
[RelativePath ="entities/"&entityIds&"/fieldvalues"]),
[Headers=[Accept="application/json", #"Authentication"=APIKey]]),

#"Converted to Table" = Table.FromList(Source, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
#"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"fieldTypeId", "value"}, {"fieldTypeId", "value"}),
#"Transposed Table" = Table.Transpose(#"Expanded Column1"),
#"Promoted Headers" = Table.PromoteHeaders(#"Transposed Table", [PromoteAllScalars=true]),
#"Expanded ProductDisplayName" = Table.ExpandRecordColumn(#"Promoted Headers", "ProductDisplayName", {"en"}, {"ProductDisplayName.en"}),
#"Expanded ProductDescriptionShort" = Table.ExpandRecordColumn(#"Expanded ProductDisplayName", "ProductDescriptionShort", {"en"}, {"ProductDescriptionShort.en"}),
#"Expanded ProductDescription" = Table.ExpandRecordColumn(#"Expanded ProductDescriptionShort", "ProductDescription", {"en"}, {"ProductDescription.en"}),
#"Expanded ProductUSP" = Table.ExpandRecordColumn(#"Expanded ProductDescription", "ProductUSP", {"en"}, {"ProductUSP.en"}),
#"Extracted Values" = Table.TransformColumns(#"Expanded ProductUSP", {"ProductMarket", each Text.Combine(List.Transform(_, Text.From)), type text}),
#"Expanded ProductApplication" = Table.ExpandRecordColumn(#"Extracted Values", "ProductApplication", {"en"}, {"ProductApplication.en"}),
#"Expanded ProductKeywords" = Table.ExpandRecordColumn(#"Expanded ProductApplication", "ProductKeywords", {"en"}, {"ProductKeywords.en"})


in
#"Expanded ProductKeywords"

0 REPLIES 0

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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