Forum Discussion
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.
| Column1 | Column2 | Column3 | Column4 | Column5 | Column6 | City | Name | Age | |
| Mumbai | New York | Hong Kong | Mumbai | A | 14 | ||||
| Name | Age | Name | Age | Name | Age | Mumbai | B | 12 | |
| A | 14 | E | 14 | I | 15 | Mumbai | C | 18 | |
| B | 12 | F | 12 | J | 17 | Mumbai | D | 10 | |
| C | 18 | G | 18 | K | 15 | New York | E | 14 | |
| D | 10 | L | 12 | New York | F | 12 | |||
| M | 13 | New York | G | 18 | |||||
| Hong Kong | I | 15 | |||||||
| Hong Kong | J | 17 | |||||||
| Hong Kong | K | 15 | |||||||
| Hong Kong | L | 12 | |||||||
| Hong Kong | M | 13 |
Was stuck at the step as below
Did this function still works or any update done and it has been removed?
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
3 Replies
- jbwtpMemorable 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
- tekhnikosNew Member
I am also trying to use List.Split and am receiving the same message. Adding to this thread for visibility