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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
mbasha_123
Frequent Visitor

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

mbasha_123_0-1664267745079.png

Thanks in advance

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

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

vkalyjmsft_0-1664334511238.png

When I select expand button>Extract Values

vkalyjmsft_1-1664334575902.png

The null row get an error the same with yours.

vkalyjmsft_3-1664334797721.png

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})

vkalyjmsft_4-1664335062599.png

Add try otherwise like this:

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

Get the result.

vkalyjmsft_5-1664335182386.png

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.

 

View solution in original post

2 REPLIES 2
adeelaziz
Frequent Visitor

Nice and simple solution!  Thanks.

v-yanjiang-msft
Community Support
Community Support

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

vkalyjmsft_0-1664334511238.png

When I select expand button>Extract Values

vkalyjmsft_1-1664334575902.png

The null row get an error the same with yours.

vkalyjmsft_3-1664334797721.png

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})

vkalyjmsft_4-1664335062599.png

Add try otherwise like this:

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

Get the result.

vkalyjmsft_5-1664335182386.png

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.

 

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

November Carousel

Fabric Community Update - November 2024

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

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.