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

The ultimate Microsoft Fabric, Power BI, Azure AI & SQL learning event! Join us in Las Vegas from March 26-28, 2024. Use code MSCUST for a $100 discount. Register 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
Fabric Community Conference

Microsoft Fabric Community Conference

Join us at our first-ever Microsoft Fabric Community Conference, March 26-28, 2024 in Las Vegas with 100+ sessions by community experts and Microsoft engineering.

February 2024 Update Carousel

Power BI Monthly Update - February 2024

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

Fabric Career Hub

Microsoft Fabric Career Hub

Explore career paths and learn resources in Fabric.

Fabric Partner Community

Microsoft Fabric Partner Community

Engage with the Fabric engineering team, hear of product updates, business opportunities, and resources in the Fabric Partner Community.

Top Solution Authors