Forum Discussion

Edderlyna's avatar
Edderlyna
New Member
3 years ago
Solved

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:...
  • jbwtp's avatar
    3 years ago

    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