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