ooptennoort
Board Regular
- Joined
- Mar 29, 2021
- Messages
- 67
- Office Version
- 365
- Platform
- Windows
I need to split a table into a range everytime Table.PositionOf finds the "Marker word". It works when using only 1 Occurence (.First or .Last) but .All produces more than 1 number in the list and Table.Range cannot deal with this.
= Table.Range(Source,(Table.PositionOf(Source,[Column1="Marker word"],Occurrence.All,"Column1")),5)
How do I get this to work? In other words, how do I get Table.Range to work on each number in a list of more than one number???? Or rather, how do I "convert a value of type List to type Number" in this context i.e. producing multiple ranges (ideally appended)?
Somehow a recursive function or loop (is there a difference?) would maybe work. Or perhaps a let with some variable, but I still lack M code knowlegde.
= Table.Range(Source,(Table.PositionOf(Source,[Column1="Marker word"],Occurrence.All,"Column1")),5)
How do I get this to work? In other words, how do I get Table.Range to work on each number in a list of more than one number???? Or rather, how do I "convert a value of type List to type Number" in this context i.e. producing multiple ranges (ideally appended)?
Somehow a recursive function or loop (is there a difference?) would maybe work. Or perhaps a let with some variable, but I still lack M code knowlegde.