Does Power BI Support Text String?

Cody Schneider••7 min read

The short answer is yes, Power BI absolutely supports text, also known as string data. In fact, its ability to manage, clean, and analyze text is fundamental to creating meaningful reports and dashboards. This article will walk you through how text data works in Power BI, how to manipulate it with DAX functions and Power Query transformations, and how to use it in your visualizations.

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

What is Text (String) Data in Power BI?

In data analysis, "text" or "string" is a data type used to represent any sequence of characters, including letters, numbers, symbols, and spaces. Think of it as anything you can't perform mathematical calculations on directly. This is some of the most common data you will ever work with.

Strings are the descriptive backbone of your data tables. For example:

  • Customer names
  • Product descriptions
  • Geographical locations (City, State, Country)
  • Categorical labels ("High," "Medium," "Low")
  • Unique IDs ("PROD-12345")
  • Open-ended survey responses

When you import data, Power BI's Power Query Editor automatically scans columns and assigns a data type. You can easily view and change this type. In the Power Query Editor, just click the icon next to the column header (like "ABC" for text or "123" for a whole number) to re-classify it if needed.

Essential "Upstream" Text Cleanup in Power Query

Before you even start building visuals, it's a best practice to clean your text data in the Power Query Editor. Think of this as cleaning your ingredients before you start cooking. Fixing issues here, "upstream," makes your calculations and reports more reliable down the line. Power Query provides a user-friendly ribbon interface for the most common text-based tasks.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

1. Splitting Columns

One of the most frequent needs is splitting a single column into multiple columns. A classic example is a "Full Name" column that you want to split into "First Name" and "Last Name."

To do this:

  1. Select the column you want to split.
  2. Go to the Transform tab in the Power Query ribbon.
  3. Click on Split Column.
  4. Choose your method, most commonly By Delimiter (like a space, comma, or dash).
  5. Power BI will prompt you to select the delimiter and how to split (e.g., at the leftmost or rightmost delimiter). Power Query then creates the new columns for you.

2. Formatting to Ensure Consistency

Data entry inconsistencies can wreck your reports. For example, "california," "California," and "CALIFORNIA" would be treated as three distinct categories. Power Query can standardize this in seconds.

With a text column selected:

  • Go to the Transform tab.
  • Click the Format button.
  • Choose options like lowercase, UPPERCASE, Capitalize Each Word (Proper Case), Trim (to remove leading/trailing spaces), or Clean (to remove non-printable characters).

Applying Trim and then Capitalize Each Word to user-submitted location data is a standard data cleaning procedure you’ll use constantly.

3. Extracting Specific Parts of a String

Sometimes you don't need the whole string, just a piece of it. For example, maybe you need the two-letter prefix from a SKU number like "SH-58291-LG" to identify a product category.

From the Transform tab:

  • Click the Extract button.
  • You can choose to extract the First Characters, Last Characters, a specific Range of characters, or text before/after a specific delimiter.

Unleashing the Power of DAX Text Functions

While Power Query is great for initial shaping, DAX (Data Analysis Expressions) is Power BI's formula language for creating powerful calculations, measures, and calculated columns within your data model. It offers a massive library of functions created specifically for slicing and dicing text.

Here are some of the most valuable DAX text functions you'll use.

Combining and Concatenating Text

Very often, you’ll need to combine text from different columns into one meaningful string, like creating a full name or a descriptive label for a chart.

CONCATENATE()

This function joins two text strings into one. It only accepts two arguments, so for more than two, you have to nest functions.

FullName = CONCATENATE(Customers[FirstName], CONCATENATE(" ", Customers[LastName]))

Ampersand (&) Operator

The ampersand is the more modern and flexible way to combine text. It's easier to read and can join any number of strings.

Customer Location = Customers[City] & ", " & Customers[State]

GraphedGraphed

Build AI Agents for Marketing

Build virtual employees that run your go to market. Connect your data sources, deploy autonomous agents, and grow your company.

Watch Graphed demo video

Finding and Extracting Substrings

These functions help you pull small pieces of text out of a larger string.

LEFT(), RIGHT(), and MID()

These should feel familiar if you've spent time in Excel.

  • LEFT(text, num_chars): Returns characters from the start (left side) of a string.
  • RIGHT(text, num_chars): Returns characters from the end (right side) of a string.
  • MID(text, start_num, num_chars): Returns a specific number of characters starting at a position you define.

Example: You have a product code TX-8910-SML and want to extract the size code.

ProductSize = RIGHT('Products'[ProductID], 3) // Returns "SML"

Finding the Position of Text

To use MID(), you often need to first find where in the string to start your extraction. That's where FIND and SEARCH come in.

FIND() and SEARCH()

Both functions return the starting position of a text string within another text string. The key difference is that FIND is case-sensitive and SEARCH is not.

Example: You need to find the user's name from an email address like 'john.doe@email.com'.

Username = 
VAR AtPosition = FIND("@", Customers[Email], 1)
RETURN LEFT(Customers[Email], AtPosition - 1)

This finds the '@' character and returns everything to the left of it.

Modifying and Replacing Text

These functions allow you to programmatically substitute or replace parts of a string without having to do it manually.

SUBSTITUTE()

Replaces existing text with new text within a string. You can use it to replace all occurrences or just a specific instance.

Syntax: SUBSTITUTE(text, old_text, new_text, [instance_num])

Formatted PhoneNumber = SUBSTITUTE('Contacts'[Phone], "-", "")

This removes all hyphens from a phone number.

REPLACE()

This is different from SUBSTITUTE. It replaces a part of a text string based on its character position and length, not on finding a specific character to replace.

Syntax: REPLACE(old_text, start_num, num_chars, new_text)

Confidential Code = REPLACE('Documents'[DocID], 3, 4, "****")

This would take a DocID like "AB1234CD" and turn it into "AB****CD", hiding the middle 4 characters.

Free PDF · the crash course

AI Agents for Marketing Crash Course

Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.

Additional Essential Text Functions

  • LEN(): Returns the number of characters in a text string. Incredibly useful for data validation.
  • UPPER(), LOWER(), PROPER(): These DAX functions change the case of your text, just like the Power Query transforms. PROPER() capitalizes the first letter of each word.
  • TRIM(): Removes leading and trailing spaces.
  • FORMAT(): A highly powerful function that converts a value (like a date or number) to text according to a specified format. For example, FORMAT(TODAY(), "dddd, mmmm dd, yyyy") would return "Wednesday, October 26, 2024".

Using Text Data in Your Reports and Visuals

Once your text is clean and correctly formatted, you can leverage it everywhere in your reports.

  • Categories and Axes: Strings are the bread and butter of visualizations. They populate the X-axis of your bar charts (e.g., Sales by Product Category) and the legends in your pie charts (e.g., Website Traffic by Country).
  • Filters and Slicers: Adding a slicer based on a text column like "Region" or "Salesperson" makes your dashboard incredibly interactive, allowing users to drill down into the data that matters to them.
  • Cards and KPIs: The simple Card visual is perfect for displaying critical text information, like the name of the top-performing campaign or the most profitable product.
  • Dynamic Titles: You can create measures that generate dynamic titles for your visuals. This makes reports incredibly professional. For instance, you could create a measure that changes a chart title to "Sales for [Selected Year]" based on what the user selects in a slicer.

Final Thoughts

Power BI isn't just a number-crunching machine, its capabilities for handling text are comprehensive and robust. From initial cleanup and transformation in Power Query to advanced analysis with DAX, you have an entire toolkit at your disposal. Mastering these text manipulation techniques is essential for turning raw, descriptive data into clear, actionable business intelligence.

Learning all the nuances of tools like Power BI can be time-consuming, especially when a deadline is closing in. We built Graphed to remove this friction, especially for marketing and sales data. Instead of learning Power Query or memorizing DAX functions, you can just connect your sources like Google Analytics, Shopify, or Salesforce and ask for what you need in plain English - like, “create a dashboard showing a breakdown of Shopify revenue by marketing source this quarter.” Our AI acts as your analyst, instantly building the live dashboards you need so you can spend your time acting on insights, not hunting for them.

Related Articles