The Split function in Power Apps turns one text string into a single-column table by cutting it at a character or substring that you choose. So Split("apples,pears,plums", ",") returns a table with three rows. You need no extra components to use it: any Text input control, variable, or Label value can be split inside a formula, and the result is usually fed straight into a Gallery, a ComboBox, or the Index function to pull out one piece.
This guide covers the syntax, how the output is structured, how to get individual items, and how to clean up the typical problems people hit when they first try it.
What You'll Need
- A Power Apps account and either a canvas app open in edit mode or a browser tab on the Power Apps formula reference
- Some text to work with: a Text input control on your screen, a SharePoint or Dataverse text column, or a hard-coded string in the formula bar
- A target control or variable to receive the result, such as a gallery or a collection
- Basic familiarity with the formula bar and the difference between a table and a single value
Step-by-Step
- Understand the signature. Split takes two required arguments: the string to divide and the separator.
Split(text, separator)is the whole function. There is no third argument in the standard version, so anything more complex is handled with other functions around it. - Start with a plain test. Add a Label to your screen and set its Text property to
Split("red,green,blue", ","). The label will show the table as text, which is a quick sanity check that the separator is matching. - Decide on your separator. The separator is case-sensitive and must match exactly. A comma is the common choice, but semicolons, pipes, slashes, spaces, and multi-character strings such as
" - "all work. If your data uses a comma followed by a space, use", "as the separator or your pieces will keep a leading space. - Send the result to a gallery. Insert a vertical Gallery and set its
Itemsproperty toSplit(TextInput1.Text, ","). The gallery treats the split result as a table of records, each with a single field calledValue. PutThisItem.Valuein a label inside the gallery template to display each piece. - Pull a single item with Index. To get just the second piece, use
Index(Split(TextInput1.Text, ","), 2).Value. Index is one-based, so the first item is 1, not 0. Wrap it in.Valuebecause the table rows are records, not bare text. - Store the result in a collection. Use
ClearCollect(colItems, Split(TextInput1.Text, ","))on a button's OnSelect. The collection then holds one column named Value that you can read anywhere in the app, count withCountRows, or loop over later. - Trim the pieces. Real data rarely arrives clean. Wrap the whole call or the individual item in Trim to strip stray spaces:
Trim(Index(Split(TextInput1.Text, ","), 1).Value). If the string can contain line breaks from a multi-line text box, split onChar(10)instead of a comma. - Join it back together. To rebuild a string from a table with a different separator, use
Concat:Concat(colItems, Value, " | "). This is the reverse of Split and is often the easiest way to normalise messy delimiters. - Test edge cases before shipping. Try an empty text input, a string with the separator at the start or end, and a string with two separators in a row. Note the results so your gallery labels and Index calls do not throw errors on real user input.
Common Mistakes
The biggest mistake is treating the result as text. Split always returns a table, so putting Split(...) directly in a Text property shows a table representation rather than a clean value; append .Value on an indexed item or use Concat to make a string.
The second mistake is forgetting that Index is one-based and that it errors rather than returning blank when the position does not exist. On a two-item string, Index(Split(text, ","), 5) produces an error, not an empty string. Guard it with If(CountRows(Split(text, ",")) >= 5, Index(...).Value, "").
Another frequent issue is an exact-match separator. A tab character, a non-breaking space pasted from a website, or a Windows line break (Char(13) & Char(10)) will not match a plain comma, so the split returns a single row containing the whole string. Separator case also matters: splitting "aXbXc" on "x" does nothing.
People also expect Split to handle multiple different separators at once. It cannot. To split on commas and semicolons together, substitute one for the other first with the Substitute function, then split on the single remaining delimiter. And watch out for splitting a value that came from a SharePoint Choice or Person column: those can return structured records rather than plain text, so convert them to text first.
Tips
- Name your separators as constants or variables if you reuse them across many formulas; a typo in one place is hard to spot.
- Use
LenandCountRowstogether to confirm how many pieces you actually got before relying on a fixed index. - Split on
Char(10)for text pasted from a multi-line field, and onChar(9)for tab-separated exports from spreadsheets. - If you need the last item without knowing how many there are, use
Last(Split(text, ",")).Valueinstead of guessing an index. - Keep splitting logic in one place, such as a named formula or a component, so changes to the delimiter do not need to be repeated on every screen.
- When building a string for storage, prefer Concat with a delimiter that is unlikely to appear in your data, then Split with the same one when reading back.
Troubleshooting
If your gallery shows one row containing the entire string, the separator is not present in the text or does not match exactly. Check for leading and trailing spaces, copy the actual character from the source data into the formula, and verify with Len that the string is what you expect.
If you see a delegation or performance warning, remember Split runs on the client. Splitting a large column across thousands of records inside a Gallery can be slow; filter the source down first, then split the single value you need.
If Index throws an error, confirm the position is within range and that you appended .Value to the record. A common cause is splitting a blank value: an empty string yields one empty row, so index 1 exists but index 2 does not.
If the value you get back is a record object rather than text, you are probably reading a table row without .Value, or your source column is not plain text. Convert it explicitly to text, then split. If nothing works, rebuild the formula in a fresh Label so you can see the raw intermediate output instead of debugging inside a gallery template.
Frequently Asked Questions
Does Split work on a single string or a table of strings?
Both. On a single string it returns a one-column table. On a table column it returns a table of tables, which is awkward; typically you filter or use First to pick one value, then split that.
How do I split on more than one character?
Pass the whole sequence as the separator, for example Split(text, "::"). Split matches the exact sequence, so multi-character delimiters work as long as they appear literally.
Why do my items still have spaces around them?
The separator you chose did not include the space. Either split on ", " or wrap the result in Trim to clean each piece.
Can Split return an empty row?
Yes. Blank text, or a separator at the very start or end of the string, can produce an empty entry. Check with an If or Filter expression before using it.
What is the reverse of Split?
Concat. It joins the rows of a table into one text value using the delimiter you specify, which is how you reassemble a split string.