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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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
Fabcon_Europe_Social_Bogo

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

PBI_Carousel_NL_June

Fabric Community Update - June 2024

Get the latest Fabric updates from Build 2024, key Skills Challenge voucher deadlines, top blogs, forum posts, and product ideas.

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.