<!-- https://learnsql.cpetoday.com/functions/dax/isfiltered -->
# ISFILTERED

Language: DAX
Category: Information
Syntax: ISFILTERED(<columnName>)
Summary: Returns TRUE when a column has a direct filter applied to it.
Returns: TRUE or FALSE (a scalar).
Level: Intermediate
Related: ISCROSSFILTERED, HASONEVALUE, SELECTEDVALUE, ISINSCOPE, CALCULATE, FILTER

## What it does
ISFILTERED reports whether a user or a visual has put a filter directly on a column. A slicer on `Stores[StoreType]` is a direct filter on that column, so ISFILTERED is TRUE for it. It does not report filters that arrive through a relationship from another table, which is the job of ISCROSSFILTERED. Use it to show a note such as "Filtered by store type" or to change a measure when the reader has narrowed the view.

## Syntax and arguments
- columnName: a column reference, such as `Stores[StoreType]`.

## Example
A regional sales report needs a note on the page when the reader has narrowed the view to certain store types, so the totals are not mistaken for the full company.

```dax
Scope Note =
IF(
    ISFILTERED(Stores[StoreType]),
    "Note: totals cover selected store types only",
    "Totals cover all store types"
)
```

If a slicer selects one store type, the first message shows. With no selection, the second message shows. The note is placed in a text card under the total.

## Example: a second, different use
Skip a rule that only makes sense for the full population, such as a company-wide benchmark, when a filter is applied:

```dax
Company Benchmark =
IF(
    NOT(ISFILTERED(Product[ProductCategory])),
    [Gross Margin %],
    BLANK()
)
```

The benchmark shows only when the report is not filtered by category, so a partial view does not get compared with the whole company.

## Things to watch
- ISFILTERED is about the column you name. A filter on another column does not count unless it flows into this one.
- Filters that come through a relationship are not direct filters. Use ISCROSSFILTERED for those.
- ISFILTERED is a display and logic test. It is not a security control.
- In a matrix row, a column that is only a row header counts as filtered only when a filter is applied to it.

## In business terms
ISFILTERED keeps a management report honest. When a reader narrows the view, the report can say so, and a company-wide figure is not compared with a partial one. Controllers and auditors look for this kind of disclosure on any pack that changes with the slicers.
