How to Use ISFILTERED in Power BI
Building a dashboard in Power BI is a great first step, but making it truly user-friendly is what separates a good report from a great one. You’ve likely run into this exact scenario: you have a slicer for product categories and a card visual meant to show a key metric, but when no category is selected, the card either shows a confusingly massive total or a value that has no context. This article will show you how to fix that using one of the most useful - and simple - functions in the DAX library: ISFILTERED.
What Exactly is the ISFILTERED Function in DAX?
In simple terms, ISFILTERED is a DAX function that checks whether a specific column or table is being directly filtered in the current context. It's a true/false function, meaning it will return one of two answers:
- TRUE: If the specified column is being filtered by a slicer, a table, or another visual.
- FALSE: If the specified column is not being directly filtered.
The basic syntax is incredibly straightforward:
ISFILTERED(<TableNameOrColumnName>)By putting a column name inside the parentheses, you’re essentially asking Power BI a simple question: "Hey, does the user have something selected for this column right now?" It's a simple check, but it opens the door to creating much smarter, more dynamic reports.
Why Is This So Useful? Creating Context-Aware Measures
The main power of ISFILTERED comes from using it within another DAX function, most commonly an IF statement. This allows you to create measures that intelligently change their behavior based on what the user has selected.
Think about these common situations:
- Avoiding Meaningless Totals: As mentioned before, you have a card showing "Average Order Value." If no specific time period or region is selected, that card will show the lifetime average order value for the entire company. This number might be useless and even misleading. Using ISFILTERED, you can instead display a helpful message like "Select a region to see its AOV."
- Creating Dynamic Titles and Labels: You can build a measure for a chart title that changes based on user selections. For example, if a year is filtered, the title could be "Sales Performance for 2023," but if nothing is selected, it could simply say "Overall Sales Performance." This small touch adds a layer of professional polish and clarity.
- Preventing Calculation Errors: Some DAX calculations can break or return odd results when they have too much data to process (i.e., when no filters are applied). You can use ISFILTERED to display a prompt asking the user to narrow their selection first, ensuring the calculation only runs when it has a manageable scope of data.
Step-by-Step Example: Building an Interactive Card Visual
Let's walk through the most common use case: creating a card that shows a metric for a selected category but provides instructions when nothing is selected. We'll use a simple dataset containing Sales revenue and Product Categories.
Our Goal
We want a report with a slicer for "Product Category." When a user clicks a category like "Electronics," a card visual should show the total "Electronics" sales. When no category is selected, that same card should show the text "Please select a category."
Step 1: Set Up Your Power BI Report
First, get your visuals on the canvas. For this example, you'll need:
- A simple data table in Power BI named 'Sales' with at least two columns: 'Product Category' and 'Revenue'.
- A Slicer visual dragged onto the report canvas. Set its field to 'Sales'[Product Category].
- A Card visual placed next to the slicer.
Step 2: Create a Basic Sales Measure
First, let's create a standard measure to see the problem we're solving. In the "Home" or "Modeling" tab, click "New Measure." Enter the following formula:
Total Sales = SUM(Sales[Revenue])Now, set the Card visual's field to use this Total Sales measure. You’ll notice that when you select a category in the slicer, the card shows that category’s sales. But when nothing is selected, it shows the Grand Total of all sales. This isn't what we want.
Step 3: Create the Smart Measure with ISFILTERED
This is where the magic happens. We'll create a new measure that combines IF and ISFILTERED. Click "New Measure" and enter this DAX formula:
Context-Aware Sales =
IF(
ISFILTERED('Sales'[Product Category]),
SUM(Sales[Revenue]),
"Please select a category"
)Let's break down this formula:
- IF(...): We start with a standard IF statement, which checks a condition and gives one result if the condition is true and another if it's false.
- ISFILTERED('Sales'[Product Category]): This is our logical test. It checks if the 'Product Category' column is being filtered by the slicer. This will be either TRUE or FALSE.
- SUM(Sales[Revenue]): This part runs if our condition is TRUE (meaning a category is selected). It calculates the sum of revenue for just the selected category.
- "Please select a category": This is the text string that is returned if our condition is FALSE (meaning no categories are selected in the slicer).
Step 4: Update Your Card Visual
Now, select your Card visual one last time. In the "Fields" pane, remove the old Total Sales measure and add your new Context-Aware Sales measure instead.
Test it out. Click "Electronics" in your slicer, and the card will display the sales for electronics. Clear the selection, and the card will now display your helpful message: "Please select a category." You've just created a much more intuitive and user-friendly experience.
Tips and Common Questions
As you get more comfortable with ISFILTERED, here are a few other things to keep in mind.
What’s the Difference Between ISFILTERED and HASONEVALUE?
This is an excellent question and a very common point of confusion for those learning DAX. They seem similar but serve different purposes.
- ISFILTERED('Sales'[Product Category]): Returns TRUE if the category column has any direct filter applied - even if the user multi-selects "Electronics," "Clothing," and "Home Goods."
- HASONEVALUE('Sales'[Product Category]): Returns TRUE only if the category column is filtered down to a single, unambiguous value. It would be FALSE if the user multi-selected more than one category.
In short: use ISFILTERED when you just need to know if any filter is active. Use HASONEVALUE when your calculation only makes sense for one specific item at a time.
Using ISFILTERED with SELECTEDVALUE for More Power
You can combine ISFILTERED with another fantastic function, SELECTEDVALUE, to create dynamic text. For instance, you could create a measure for a chart title like this:
Dynamic Chart Title =
IF(
ISFILTERED('Sales'[Product Category]),
"Sales for " & SELECTEDVALUE('Sales'[Product Category]),
"Total Sales Overview"
)When a user selects "Electronics," an object using this measure will display the title "Sales for Electronics." If nothing is selected, it will show "Total Sales Overview."
Does ISFILTERED Work for Page-Level or Report-Level Filters?
Yes, ISFILTERED's check for 'direct filtering' includes slicers as well as filters applied in the filter pane for a specific visual, the whole page, or the entire report.
Final Thoughts
The ISFILTERED function is a perfect example of a DAX command that’s easy to learn but adds a huge amount of value to your Power BI reports. By checking if a filter is active, you can build smarter measures that provide clear context, guide your users, and prevent the display of confusing or meaningless data, ultimately making your dashboards far more effective.
Learning the intricacies of tools like Power BI and remembering the syntax for every DAX function takes serious time and effort. We know firsthand how many hours can be spent simply trying to wrangle data into a useful report instead of analyzing it. That's precisely why we created Graphed. Our platform automates the entire reporting process by letting you use natural language to connect your data sources and build real-time dashboards in seconds, not hours. Instead of learning complex functions, you can just ask, "Show me a dashboard of sales by product category" and let AI handle the heavy lifting for you.
Related Articles
How to Connect Facebook to Google Data Studio: The Complete Guide for 2026
Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.
Appsflyer vs Mixpanel: Complete 2026 Comparison Guide
The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.
DashThis vs AgencyAnalytics: The Ultimate Comparison Guide for Marketing Agencies
When it comes to choosing the right marketing reporting platform, agencies often find themselves torn between two industry leaders: DashThis and AgencyAnalytics. Both platforms promise to streamline reporting, save time, and impress clients with stunning visualizations. But which one truly delivers on these promises?