Splitter.SplitTextByRepeatedLengths is a Power Query M function that splits text into a list after the specified length repeatedly. The function returns a list of text segments after applying the repeated length-based splitting.
Compatible with: Power BI Service Power BI Desktop Excel Microsoft 365
Syntax
Splitter.SplitTextByRepeatedLengths(
length as number,
optional startAtEnd as nullable logical,
) as function
Description
Returns a function that splits text into a list of text after the specified length repeatedly.
Examples
Repeatedly split the input into chunks of three characters, starting from the beginning of the input.
// Output: {"123", "456", "78"}
Splitter.SplitTextByRepeatedLengths( 3 )( "12345678" )
Repeatedly split the input into chunks of three characters, starting from the end of the input.
// Output: {"87", "654", "321"}
let
startAtEnd = true
in
Splitter.SplitTextByRepeatedLengths( 3, startAtEnd )( "87654321" )
Used by
While the Splitter.SplitTextByRepeatedLengths function can be used on its own, it is also used by the following functions:
Related functions
Other functions related to Splitter.SplitTextByRepeatedLengths are:
- Splitter.SplitByNothing
- Splitter.SplitTextByAnyDelimiter
- Splitter.SplitTextByCharacterTransition
- Splitter.SplitTextByDelimiter
- Splitter.SplitTextByEachDelimiter
- Splitter.SplitTextByLengths
- Splitter.SplitTextByPositions
- Splitter.SplitTextByRanges
- Splitter.SplitTextByWhitespace
