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
Markzolotoy
Impactful Individual
Impactful Individual

Error running query

I am getting the follow error running my query:

Expression.Error: We cannot convert the value 7 to type Record.
Details:
Value=7
Type=[Type]

 

Any idea how to troubleshoot that problem?

 

Here is my code:

url_system = "https://localhost:446/api/home/system",
    Credentials = "Bearer " & Token[access_token],
    System = Json.Document(Web.Contents(url_system, 
            [
                Headers = [#"Content-Type"="application/json",#"Authorization"=Credentials]
            ]
        )
    ),
    #"Converted to Table" = Record.ToTable(System),
    #"Added Index" = Table.AddIndexColumn(#"Converted to Table", "Index", 0, 1, Int64.Type),
    #"Filtered Rows" = Table.SelectRows(#"Added Index", each ([Value] <> 3288)),
    #"Expanded Value" = Table.ExpandRecordColumn(#"Filtered Rows", "Value", {"OkCount", "AlertCount", "Details"}, {"Value.OkCount", "Value.AlertCount", "Value.Details"}),
    #"Expanded Value.Details" = Table.ExpandListColumn(#"Expanded Value", "Value.Details"),
    #"Expanded Value.Details1" = Table.ExpandRecordColumn(#"Expanded Value.Details", "Value.Details", {"Id", "Name", "LastUpdated", "Status", "StatusColor", "WarningInfo", "AlarmInfo"}, {"Value.Details.Id", "Value.Details.Name", "Value.Details.LastUpdated", "Value.Details.Status", "Value.Details.StatusColor", "Value.Details.WarningInfo", "Value.Details.AlarmInfo"}),
    #"Changed Type" = Table.TransformColumnTypes(#"Expanded Value.Details1",{{"Value.Details.LastUpdated", type datetime}})
in
    #"Changed Type"

 

 

 

Thanks

1 REPLY 1
Anonymous
Not applicable

Hi @Markzolotoy,

I'd like to suggest you changing the active query step to confirm which query step shows the issue. Then you can copy the received query table records from 'source' step and share them here with table format. (we can copy them and test with your query formulas)

Regards,

Xiaoxin Sheng

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.