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
Edderlyna
New Member

Expression Error: The name ‘List.Split wasn’t recognised.

Hi, I am a new to Power Query. I'm using Excel 2016. 

 

Last week when I using the function 'List.Split', it work's totally fine, but now when I refresh my query I get this error (Expression error: The name 'List.Split' wasn't recognized. Make sure it's spelled correctly.)

 

I have checked multiple times and re-do steps by steps according a learning video but can't spot which step I get it wrong. The List.Split function just do not works on my computer.

 

I'm trying to convert multiple column groups to rows. From the left table and expecting a result as right table.

 

Column1Column2Column3Column4Column5Column6 CityNameAge
Mumbai New York Hong Kong  MumbaiA14
NameAgeNameAgeNameAge MumbaiB12
A14E14I15 MumbaiC18
B12F12J17 MumbaiD10
C18G18K15 New YorkE14
D10  L12 New YorkF12
    M13 New YorkG18
       Hong KongI15
       Hong KongJ17
       Hong KongK15
       Hong KongL12
       Hong KongM13


Was stuck at the step as below

 

let
  Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content],
  Sheet1_Sheet = Table.TransformColumnTypes(Source,{{"Column1", type text}, {"Column2", type any}, {"Column3", type text}, {"Column4", type any}, {"Column5", type text}, {"Column6", type any}}),
  Cols = List.Distinct(Record.ToList(Sheet1_Sheet{1})),
  ToLists = List.Transform(Table.ToColumns(Table.Skip(Sheet1_Sheet,2)),each List.RemoveNulls(_)),
  Custom1 = List.Split(ToLists,2)
in
  Custom1

Did this function still works or any update done and it has been removed?
If the List.Split function is not functioning, any other way I can do to get the similar results? 

Thank you in advanced for any one read my question.
1 ACCEPTED SOLUTION
jbwtp
Memorable Member
Memorable Member

Hi @Edderlyna,

 

This is quite strange... Can you try using the List.Split in a different environment? E.g. in Excel if you do it in PBI and vise versa?

 

The List.Split can be replaced with something like this:

fListSplit = (list, pageSize) => List.Accumulate({0..Number.RoundUp(List.Count(list) / pageSize) - 1}, {}, (a, n)=> a & {List.Range(list,  n * pageSize, pageSize)})

And then you just call it fListSplit rather than List.Split. It will do the same thing. But this is quite strange. List.Split works Ok in my PQ.

 

Cheers,

John

View solution in original post

3 REPLIES 3
tekhnikos
New Member

I am also trying to use List.Split and am receiving the same message.  Adding to this thread for visibility

jbwtp
Memorable Member
Memorable Member

Hi @Edderlyna,

 

This is quite strange... Can you try using the List.Split in a different environment? E.g. in Excel if you do it in PBI and vise versa?

 

The List.Split can be replaced with something like this:

fListSplit = (list, pageSize) => List.Accumulate({0..Number.RoundUp(List.Count(list) / pageSize) - 1}, {}, (a, n)=> a & {List.Range(list,  n * pageSize, pageSize)})

And then you just call it fListSplit rather than List.Split. It will do the same thing. But this is quite strange. List.Split works Ok in my PQ.

 

Cheers,

John

Hi @jbwtp John,

I tried List.Split on my office computer and it works OK. Might be my excel version wasn't updated. Thank you for your time to provide advice and solutions. I tried on the fListSplit. It's quite abstruse to me , will find out myself about it. Thank you again! 🙂🙂

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!

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.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.