How to Add a Search Bar in Power BI

Cody Schneider8 min read

Adding a search bar in Power BI transforms a good report into a great one, allowing users to find exactly what they need in seconds. Instead of endlessly scrolling through long lists, they can simply type to filter. This article will walk you through the easiest ways to add search functionality, from a basic slicer search to a more dynamic, custom search box for your visuals.

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

Why Add a Search Bar in Power BI?

Before jumping into the "how," let's quickly cover the "why." You've spent hours connecting data, building your model, and creating insightful visuals. The final step is making all that hard work accessible. A search bar is one of the best ways to improve your report's usability.

Consider a report that lists sales data by product. If you have 20 products, a simple slicer will do. But what if you have 2,000? Users would have to scroll endlessly to find "Laptop Pro 15-inch." A search bar lets them type "laptop" and see all relevant options instantly. This simple addition makes your dashboards less intimidating and more efficient for everyone, empowering them to explore data without friction.

Method 1: Using the Built-in Slicer Search Feature

The simplest way to add search functionality is by using a feature that’s already built into Power BI’s slicer visual. It’s perfect for letting users quickly filter down items in a long list. It's often enabled by default, but it's important to know how to turn it on and off.

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.

Step-by-Step Instructions:

  1. Add a Slicer Visual: In the Visualizations pane, select the Slicer icon and add it to your report canvas.
  2. Add Your Data Field: Drag the field you want to be searchable into the "Field" well of the slicer. For example, you could drag the Product Name column from your Products table.
  3. Enable the Search Function: With the slicer selected, click the ellipsis (...) in the top-right corner of the visual. A context menu will appear.
  4. Select "Search": Make sure there is a checkmark next to the "Search" option. If there is, the search bar will be visible at the top of your slicer list. If not, clicking it will add the search functionality.

That's it! Users can now click into that slicer, start typing a product name, country, or whatever data you've used, and the list will filter in real-time. This method is incredibly quick to set up and works perfectly for simple filtering tasks.

Method 2: Using the "Text Filter" Custom Visual

What if you want a standalone search box that looks more like a traditional web search bar, rather than just being part of a slicer? For this, you can turn to Power BI’s marketplace of custom visuals. The "Text Filter" visual is a fantastic and popular choice for this job.

Step-by-Step Instructions:

1. Import the Custom Visual

First, you need to add the "Text Filter" visual to your Power BI project.

  • In the Visualizations pane, click the ellipsis (...) below the standard visual icons.
  • Select Get more visuals from the menu.
  • This will open the AppSource marketplace. In the search bar at the top, type "Text Filter."
  • Find the visual (it's typically the one created by Microsoft) and click Add. Power BI will add its icon to your Visualizations pane.

2. Configure the Text Filter Visual

Now that you have the visual, you can add and configure it.

  • Click the newly added "Text Filter" icon in your Visualizations pane to add it to your report canvas.
  • With the visual selected, drag the data field you want to search through into the Category field well. For example, you would use your Product Name column here.
  • Resize the visual as needed. You now have a dedicated input box on your report for searching.

3. Connect It to Other Visuals

The best part about this method is how it seamlessly interacts with the rest of your report. If you have a table or a chart showing sales by Product Name, typing "keyboard" into your new Text Filter will automatically filter the other visuals on the page to only show products with "keyboard" in their name. This creates a very intuitive and powerful user experience with minimal setup.

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

Method 3: The Power User’s Method Using DAX Measures

For ultimate control and customization, you can create a search filter using a DAX measure. This approach lets you define exactly how the search works - for instance, creating a "contains" search functionality that filters a table or matrix without a custom visual. It’s more advanced but offers incredible flexibility.

The Goal:

We'll create a measure that checks if a product name contains the text typed by the user. Then, we’ll use that measure to filter a table visual. This gives you a pure "search box" experience on visuals rather than just within a list.

1. Create a Table to Hold the Search Input

Since we need a place to store what the user types, we'll create a simple, disconnected table. This table won't have any relationships with your main data model, it's just a temporary container.

  • Go to the Home tab on the ribbon and click Enter Data.
  • A dialog box will appear. Name the first column SearchTerm. You can leave the first row blank.
  • Name the table Search Input and click Load.

2. Create a Slicer for User Input

Next, we need a way for the user to input their search term.

  • Add a regular Slicer visual to your report.
  • Drag the SearchTerm field from your new Search Input table into the slicer's "Field" well.
  • Enable the search feature on this slicer (using Method 1) so it acts as an input box.

3. Write the Filtering Measure

This is where the magic happens. We'll write a DAX measure that determines whether a given product should appear in the results. This measure will return a 1 if the product name contains the search text and will be blank otherwise.

  • Right-click on your products table (or any relevant table) and select New Measure.
  • Enter the following DAX formula into the formula bar:

Product Search Filter = VAR SelectedSearchText = SELECTEDVALUE('Search Input'[SearchTerm], "") RETURN IF( // If search box is empty, show everything by returning 1 SelectedSearchText = "", 1, // If not empty, check if the product name for the current row contains the search text IF( NOT(ISERROR( SEARCH(SelectedSearchText, MAX(Products[Product Name]), 1, 0) )), 1 ) )

Let's break this down:

  • SelectedSearchText = SELECTEDVALUE('Search Input'[SearchTerm], ""): This captures the text that the user selected or typed into the slicer. If nothing is entered, it defaults to a blank string.
  • IF(SelectedSearchText = "", 1, ...): This logic checks if the search slicer is empty. If it is, it returns 1 for all rows, meaning nothing will be filtered out.
  • SEARCH(SelectedSearchText, MAX(Products[Product Name]), 1, 0): This is the core function. It looks for the search text inside the product name for the current row in the visual. The MAX() function is used to get the specific product name in the current filter context (i.e., for that particular row in your table visual). If the text isn't found, SEARCH returns an error, so we wrap it in logic to handle that.
  • IF(NOT(ISERROR(...)), 1): If SEARCH does not return an error (meaning the text was found), our measure returns a 1. If it did error out, the measure returns a blank.

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.

4. Apply the Measure to Your Visual

The final step is to use this measure as a filter on the visual you want to update dynamically.

  1. Select the table, matrix, or chart you want to filter (e.g., your Sales by Product table).
  2. Go to the Filters pane.
  3. Drag your new measure, Product Search Filter, into the "Filters on this visual" section.
  4. Set the filter condition to "is 1" and click Apply filter.

Now, your visual is connected to your search slicer. When a user types into the slicer, only the rows where the product name contains the search term will remain visible in the table.

Final Thoughts

Mastering these search features - the native slicer search, the "Text Filter" custom visual, and powerful DAX measures - will make your Power BI reports significantly more user-friendly and functional. Each method has its place, from quick fixes to highly customized solutions, helping users get straight to the insights they need.

Ultimately, the goal is always to make data analysis faster and more intuitive. While these Power BI features improve how people interact with reports, the process of building sophisticated reports and troubleshooting DAX can still be a barrier. At Graphed we created a way to skip that complexity entirely. We let our users connect their data sources and then create dashboards just by asking questions in plain English - like "create a line chart showing sales for our top 5 products last quarter." It turns hours of report building into a 30-second conversation, giving you the answers you need without the technical overhead.

Related Articles