How to Filter a Measure in Power BI (CALCULATE, FILTER and KEEPFILTERS Examples)

A sales director asked me for a summary table with total revenue next to West revenue, Q1 revenue and furniture revenue, plus a product list that only shows products above a minimum the user picks. Every one of those columns is the same Revenue measure with a different filter applied.

In this tutorial, I’ll show you how to filter a measure in Power BI with CALCULATE and FILTER: by one or several values, multiple columns, dates, another table and a slicer selection. I’ll also cover filtering a visual by a measure and common mistakes.

Quick answer: Wrap the measure in CALCULATE and add the filter as an argument, for example West Revenue = CALCULATE([Revenue], SalesData[Region] = "West"). Use IN {"East", "West"} for several values, extra arguments for more columns (they combine with AND), and FILTER(table, condition) when the condition needs a calculation. To filter a visual by a measure instead, add the measure under Filters on this visual.

How filtering a measure works

A measure is calculated in the filter context of each cell: the row’s region, the slicers, the page filters. CALCULATE changes that context before the measure is evaluated. If you haven’t written one before, start with how to create a measure in Power BI. These are the patterns I use most:

You wantFilter argumentExample result
One valueSalesData[Region] = "West"West revenue only
Several valuesSalesData[Region] IN { "East", "West" }East + West revenue
Exclude a valueSalesData[Region] <> "East"Everything except East
Two columns (AND)Two arguments, separated by a commaWest and Laptop
A date rangeDATESBETWEEN ( date, start, end )Q1 revenue
A calculated conditionFILTER ( table, condition )Only large order lines
Keep the visual’s filterKEEPFILTERS ( condition )Blank for other regions
Ignore a filterREMOVEFILTERS ( column )Total for all regions

All the examples below use the Revenue measure from SUM vs SUMX in Power BI, on a SalesData table of 400 US orders from 2026 and a ProductList table related by Product.

Filter a measure by one value

Select Home > New measure and enter:

West Revenue = CALCULATE ( [Revenue], SalesData[Region] = "West" )
Power BI table by Region with Revenue, West Revenue, East or West Revenue, Furniture Revenue, Q1 Revenue, Large Line Revenue and West Revenue KEEPFILTERS, with the West Revenue CALCULATE formula in the formula bar

Look at the West Revenue column: it shows $220,683 on every row, including Central, East and South. That’s not a bug.

A filter argument on the Region column replaces the filter that the table row puts on the same column, so each row is recalculated for West. It’s exactly what you want on a card or in a “share of West” ratio, and the reason the next section exists.

Text values need double quotes. Numbers don’t: SalesData[Discount] = 0 keeps only lines without a discount.

Filter a measure by multiple values

To include several values of the same column, use IN with a list in curly braces:

East or West Revenue =
CALCULATE ( [Revenue], SalesData[Region] IN { "East", "West" } )

In my table it returns $377,654, the East total ($156,971) plus the West total ($220,683). SalesData[Region] = "East" || SalesData[Region] = "West" gives the same result, but IN is easier to read and extend. To exclude values, use NOT SalesData[Region] IN { "East", "West" } or <> for a single value.

Filter a measure by multiple columns

Every extra filter argument is combined with AND. This returns laptop revenue in the West only:

West Laptop Revenue =
CALCULATE (
    [Revenue],
    SalesData[Region] = "West",
    SalesData[Product] = "Laptop"
)

For OR across two columns (West orders, or laptop orders anywhere), the condition has to look at both columns at once, so put them in one FILTER over just those columns:

West or Laptop Revenue =
CALCULATE (
    [Revenue],
    FILTER (
        ALL ( SalesData[Region], SalesData[Product] ),
        SalesData[Region] = "West" || SalesData[Product] = "Laptop"
    )
)

The same AND/OR logic applies to IF conditions inside measures; see the Power BI IF measure for those operators.

Keep the visual’s filter with KEEPFILTERS

If you want the filter to work together with the row’s filter instead of replacing it, wrap the condition in KEEPFILTERS:

West Revenue KEEPFILTERS =
CALCULATE ( [Revenue], KEEPFILTERS ( SalesData[Region] = "West" ) )
Power BI formula bar with West Revenue KEEPFILTERS = CALCULATE([Revenue], KEEPFILTERS(SalesData[Region] =

Now the Central, East and South rows are blank, because a region can’t be both Central and West. Only the West row and the total show $220,683. Use KEEPFILTERS when the measure goes into a table or chart split by the same column; use the plain version for cards and ratios.

Filter with a condition: the FILTER function

A simple filter argument compares a column to a fixed value. When the condition needs a calculation per row, such as quantity times unit price, use FILTER, which goes through the table row by row:

Large Line Revenue =
CALCULATE (
    [Revenue],
    FILTER ( SalesData, SalesData[Quantity] * SalesData[Unit Price] > 2000 )
)

It keeps only order lines worth more than $2,000 before discount: $538,990 of the $720,004 total. The same idea counts rows instead of summing them in the Power BI COUNTIF measure.

FILTER over a whole table is slower than a column filter on large models, so use it only when you need it. If the condition is on one column, write FILTER ( ALL ( SalesData[Quantity] ), ... ) or a plain filter argument instead.

Filter a measure by date or date range

For a fixed period, DATESBETWEEN takes a date column and the first and last date:

Q1 Revenue =
CALCULATE (
    [Revenue],
    DATESBETWEEN ( SalesData[Order Date], DATE ( 2026, 1, 1 ), DATE ( 2026, 3, 31 ) )
)

It returned $260,663 for 01/01/2026 to 03/31/2026. Two comparisons do the same: SalesData[Order Date] >= DATE ( 2026, 1, 1 ), SalesData[Order Date] <= DATE ( 2026, 3, 31 ). For a rolling period, use TODAY():

Last 30 Days Revenue =
CALCULATE ( [Revenue], SalesData[Order Date] >= TODAY () - 30 )

Time intelligence functions such as DATESYTD and SAMEPERIODLASTYEAR work best with a marked date table; here’s how to create a date table in Power BI. For date filters in the Filters pane instead of DAX, see how to filter dates in Power BI.

Filter a measure by a column in another table

You can filter on any column of a related table. Category lives in ProductList, which is related to SalesData by Product:

Furniture Revenue = CALCULATE ( [Revenue], ProductList[Category] = "Furniture" )

The filter flows through the relationship to SalesData and returns $213,552 for desks, chairs and bookcases. If the tables aren’t related, the filter does nothing, so check the model view first. For a breakdown by every category instead of one, see how to calculate a measure by category.

Filter a measure based on a slicer selection

The second request was a product list that only shows products above a minimum revenue the user picks. First, create a table of thresholds with Modeling > New table:

Revenue Threshold = GENERATESERIES ( 0, 150000, 10000 )

Add a slicer with its Value column, set the style to Dropdown and turn on Single select. Then create a flag measure that compares each product’s revenue with the selection:

Show Product =
IF ( [Revenue] >= SELECTEDVALUE ( 'Revenue Threshold'[Value], 0 ), 1, 0 )

Finally, select the table visual, add Show Product under Filters on this visual, choose is, type 1 and select Apply filter.

Power BI table showing Desk, Laptop, Monitor and Office Chair with a Minimum revenue dropdown slicer set to 50000 and the visual-level filter Show Product is 1

With 50000 selected, the table keeps Desk, Laptop, Monitor and Office Chair, $580,619 in total. Pick another value and the list updates. More ways to read a slicer in DAX are in how to get the selected value from a slicer.

Filter a visual by a measure without DAX

If you only need to hide rows in one visual, skip the flag measure: drag the measure itself into Filters on this visual, choose Show items when the value is greater than, type the number and apply. Measures can only be visual-level filters, not page or report filters; adding filters in Power BI covers every level.

Keep in mind that the measure filter is evaluated at the visual’s level of detail. Filtering Revenue > 50000 on a table by Product keeps products; add Region to the same table and the condition is checked for each product and region pair, so rows can disappear.

Ignore filters with ALL and REMOVEFILTERS

Sometimes you need the opposite: a measure that ignores a filter, usually for a percentage of total:

All Regions Revenue = CALCULATE ( [Revenue], REMOVEFILTERS ( SalesData[Region] ) )

Region Share = DIVIDE ( [Revenue], [All Regions Revenue] )

ALL does the same as REMOVEFILTERS inside CALCULATE. A worked example is in calculating percentage of total in a matrix.

Common mistakes when filtering measures

  • Every row shows the same number: the filter replaces the row’s filter on that column. Use KEEPFILTERS, or that’s the intended behavior.
  • The filter is ignored: the filter column is in a table with no relationship to the measure’s table, or the relationship points the wrong way.
  • A measure in a filter argument errors out: a plain filter argument can’t use a measure such as [Revenue] > 1000. Use FILTER over the column you want to test, for example FILTER ( VALUES ( SalesData[Product] ), [Revenue] > 1000 ).
  • Single quotes around text: DAX text needs double quotes; single quotes are for table names.
  • The total doesn’t match the rows: totals are recalculated in their own context. Check the total separately, especially with flag measures.

These Power BI measure tutorials go well with this one:

Frequently Asked Questions

How do I filter a measure in Power BI?

Wrap the measure in CALCULATE and add the filter as an argument, such as CALCULATE([Revenue], SalesData[Region] = “West”). Microsoft’s CALCULATE reference lists the filter argument rules.

How do I filter a measure by multiple values?

Use IN with a list, for example SalesData[Region] IN {“East”, “West”}, or combine conditions on the same column with ||.

What is the difference between CALCULATE and FILTER?

CALCULATE evaluates an expression in a changed filter context. FILTER returns a table of rows that meet a condition and is often used as a filter argument inside CALCULATE when the condition needs a calculation.

Why does my filtered measure show the same value on every row?

A filter argument on a column replaces the row’s filter on that column. Wrap the condition in KEEPFILTERS to combine them instead.

Can I use a measure as a page filter in Power BI?

No. Measures can only filter at the visual level. For page-wide filtering, use a column, or a flag measure added to each visual.