Forum Discussion

mbasha_123's avatar
mbasha_123
Frequent Visitor
3 years ago
Solved

Expression Error: we cannot convert value null to type list

Getting Expression Error when loading Data from SQL using a Custom Connector. below is the Screenshot of the error Thanks in advance
  • v-yanjiang-msft's avatar
    3 years ago

    Hi mbasha_123 ,

    It's there is a "null" value in the column, the "null" value is not list type, it can't execute the step you applied.

    For example this column

    When I select expand button>Extract Values

    The null row get an error the same with yours.

    Here's my solution, add the function try otherwise in the code.

    Here's the original code which return an error.

    = Table.TransformColumns(New, {"Name", each Text.Combine(List.Transform(_, Text.From)), type text})

    Add try otherwise like this:

    = Table.TransformColumns(New, {"Name", each try Text.Combine(List.Transform(_, Text.From)) otherwise null , type text})

    Get the result.

    I attach my sample below for your reference.

     

    Best Regards,
    Community Support Team _ kalyj

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.