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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

We cannot convert the value "" to type record- error message

Hi, I am having this problem: 

AndrejBI_0-1614159947537.png

 

This is my M-code, I didn't do anything extraordinary. 

    #"Converted to Table" = Table.FromList(result, Splitter.SplitByNothing(), null, null, ExtraValues.Error),
    #"Expanded Column1" = Table.ExpandRecordColumn(#"Converted to Table", "Column1", {"instance", "nps_value", "actual_value", "assessment_group", "sys_updated_on", "reference_value", "sys_id", "sys_updated_by", "reference_table", "sys_created_on", "sys_domain", "passed", "weighted_value", "add_info", "normalized_value", "sys_created_by", "string_value", "assign_to_order", "instance_question", "template_definition", "sys_mod_count", "metric_definition", "is_default", "sys_domain_path", "sys_tags", "scaled_value", "metric", "source_id", "source_table", "user", "duration_value"}, {"instance", "nps_value", "actual_value", "assessment_group", "sys_updated_on", "reference_value", "sys_id", "sys_updated_by", "reference_table", "sys_created_on", "sys_domain", "passed", "weighted_value", "add_info", "normalized_value", "sys_created_by", "string_value", "assign_to_order", "instance_question", "template_definition", "sys_mod_count", "metric_definition", "is_default", "sys_domain_path", "sys_tags", "scaled_value", "metric", "source_id", "source_table", "user", "duration_value"}),
    #"Removed Columns" = Table.RemoveColumns(#"Expanded Column1",{"is_default", "sys_domain_path"}),
    #"Expanded instance" = Table.ExpandRecordColumn(#"Removed Columns", "instance", {"link", "value"}, {"instance.link", "instance.value"}),
    #"Removed Columns1" = Table.RemoveColumns(#"Expanded instance",{"nps_value", "duration_value"}),
    #"Expanded metric" = Table.ExpandRecordColumn(#"Removed Columns1", "metric", {"link", "value"}, {"metric.link", "metric.value"}),
    #"Expanded instance_question" = Table.ExpandRecordColumn(#"Expanded metric", "instance_question", {"link", "value"}, {"instance_question.link", "instance_question.value"}),
    #"Removed Columns2" = Table.RemoveColumns(#"Expanded instance_question",{"assign_to_order", "sys_created_by", "normalized_value", "add_info", "weighted_value"}),
    #"Merged Queries" = Table.NestedJoin(#"Removed Columns2", {"metric.value"}, Questions, {"Sys_ID"}, "Questions", JoinKind.LeftOuter),
    #"Expanded Questions" = Table.ExpandTableColumn(#"Merged Queries", "Questions", {"Column1.name", "Column1.question"}, {"Questions.Column1.name", "Questions.Column1.question"}),
    #"Filtered Rows" = Table.SelectRows(#"Expanded Questions", each ([Questions.Column1.name] = "User Satisfaction")),
    #"Removed Columns3" = Table.RemoveColumns(#"Filtered Rows",{"reference_value", "reference_table", "sys_tags", "passed", "assessment_group", "sys_domain", "template_definition", "metric_definition", "source_id", "user"}),
    #"Changed Type" = Table.TransformColumnTypes(#"Removed Columns3",{{"sys_updated_on", type datetime}, {"sys_created_on", type datetime}}),
    #"Replaced Value" = Table.ReplaceValue(#"Changed Type","""""",0,Replacer.ReplaceValue,{"instance.link", "instance.value", "actual_value", "sys_updated_on", "sys_id", "sys_updated_by", "sys_created_on", "string_value", "instance_question.link", "instance_question.value", "sys_mod_count", "scaled_value", "metric.link", "metric.value", "source_table", "Questions.Column1.name", "Questions.Column1.question"})
in
    #"Replaced Value"

 

 

1 ACCEPTED SOLUTION
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

There might be two types of values in your record after you expanding the list column.

https://community.powerbi.com/t5/Power-Query/Error-On-Load-Table-We-cannot-convert-a-value-of-type-Record-to/m-p/1361081 

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

View solution in original post

1 REPLY 1
v-jayw-msft
Community Support
Community Support

Hi @Anonymous ,

 

There might be two types of values in your record after you expanding the list column.

https://community.powerbi.com/t5/Power-Query/Error-On-Load-Table-We-cannot-convert-a-value-of-type-Record-to/m-p/1361081 

 

Best Regards,

Jay

Community Support Team _ Jay
If this post helps, then please consider Accept it as the solution
to help the other members find it.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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

Top Solution Authors