cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
AndrejBI
Helper V
Helper V

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 @AndrejBI ,

 

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

 

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 @AndrejBI ,

 

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

 

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
September Update

Check it Out!

Click here to learn more about the September 2022 updates!

Power BI Show episode 9

The Power BI Community Show

Watch the playback when Priya Sathy and Charles Webb discuss Datamarts! Kelly also shares Power BI Community updates.

Power BI Dev Camp Session 26

New Date - Check it Out!

Mark your calendars and join us on Thursday, October 6 at 11a PDT for a great session with Ted Pattison!

Top Solution Authors