All Function In DAX
Level: intermediate · ~16 min read · Intent: informational
Audience: data analysts, finance teams, operations teams
Prerequisites
- basic spreadsheet literacy
- introductory Power BI concepts
Key takeaways
- The ALL function in DAX is mainly used to remove filters from a table or column so you can calculate totals, percentages, comparisons, and other measures that need a broader context than the current visual selection.
- The best way to understand ALL is to think of it as a filter-removal tool inside DAX measure logic, especially when building percentage-of-total measures, ranking logic, and context-aware KPIs.
FAQ
- What does the ALL function do in DAX?
- The ALL function removes filters from a table or specific columns, which lets a measure evaluate against a broader total or base context instead of the currently filtered subset only.
- When should I use ALL in DAX?
- Use ALL when you need a measure to ignore some existing filters, such as when calculating percentage of total, total company revenue, category contribution, ranking logic, or comparisons against an unfiltered base.
- What is the difference between ALL and REMOVEFILTERS in DAX?
- Both can be used to remove filters, but REMOVEFILTERS is often the clearer choice when your goal is specifically to clear filters, while ALL can also return a table in DAX expressions.
- Why does ALL sometimes not behave the way I expect?
- ALL can behave unexpectedly when model structure, filter context, or auto-exist interactions are involved, especially when multiple filters from the same table combine in ways that narrow the result differently than beginners expect.
The ALL function is one of the most useful DAX functions because many business questions depend on comparing the current filtered result to a broader total. A normal measure often respects the current filter context, which is usually exactly what you want. But sometimes you need a measure that says:
- show the total across all categories
- show the total across all regions
- show the total ignoring the current slicer
- compare this segment to the full total
- calculate percentage of total revenue
- rank items against the full set instead of the current subset
That is where ALL becomes important.
A lot of DAX users meet ALL for the first time when building percentage-of-total measures, and that is a good starting point. But ALL matters far beyond that. It is one of the key functions for understanding how filter removal works in DAX and how measures can deliberately step outside the current report context.
This guide explains what the ALL function in DAX does, how it works, when to use it, how it differs from REMOVEFILTERS, why it appears in so many business-reporting measures, and what mistakes beginners usually make with it.
Overview
The ALL function removes filters from a table or from one or more columns.
That sounds simple, but it has big consequences in Power BI.
A normal measure is evaluated in the current filter context. That context might come from:
- slicers
- page filters
- report filters
- chart categories
- relationships
- drill interactions
ALL is useful when you want to remove some of those filters so the measure can evaluate against a broader base.
That broader base might be:
- all rows in a table
- all values in a column
- all categories within the same table
- the full denominator for a percentage calculation
- a ranking base that should ignore current item selection
This is why ALL appears so often in:
- percentage-of-total measures
- comparison measures
- ranking patterns
- totals that ignore certain filters
- KPI logic that needs a stable reference point
What ALL actually does
A practical way to think about ALL is this:
ALL removes filters so the expression can see more of the model than the current visual selection would normally allow.
For example, suppose you have a measure for total revenue.
Without ALL, a visual by category might show revenue for:
- Hardware
- Software
- Services
Each bar respects the category filter for that row.
If you want to calculate the share of total revenue that each category contributes, you need:
- numerator = revenue in the current category context
- denominator = revenue across all categories
That denominator is where ALL often appears.
It tells DAX: remove the category filter so I can calculate the broader total.
That is one of the most common and useful uses of ALL.
Why ALL matters so much in DAX
ALL matters because a lot of business analysis depends on a comparison base.
You often do not just want the filtered number. You want the filtered number compared to:
- the whole company
- the full category total
- all months
- all products
- all customers
- all regions
- all rows in a table
Without a filter-removal function, the measure stays inside the current visual context and cannot easily establish that broader denominator or reference point.
That is why ALL is such an important tool in DAX.
The most common uses of ALL
There are a few places where ALL shows up again and again.
Percentage of total
This is the classic use case.
Examples:
- category share of total revenue
- region share of total sales
- customer contribution to overall revenue
- product share of units sold
The measure usually needs a denominator that ignores the current category or segment filter.
Ranking logic
If you rank products or customers, you often want the ranking to compare across the full set, not just the currently filtered visual slice.
ALL often helps define that larger comparison base.
Ignore one filter, keep others
Sometimes you want to remove only one specific filter while preserving the rest of the current context.
For example:
- keep the selected year
- keep the selected region
- but ignore the product-category filter
This is a very practical business pattern.
Stable benchmark measures
Some KPI measures need a constant benchmark such as:
- full-company revenue
- all-channel revenue
- all-region total
- all-product total
ALL helps create that broader benchmark.
A simple percentage example
Suppose you already have:
Total Revenue = SUM(Sales[Revenue])
Now you want: What percentage of total revenue comes from the current category?
A common pattern is:
- numerator = current category revenue
- denominator = total revenue across all categories
- result = numerator / denominator
The denominator usually uses ALL on the category column or table so the current category filter is removed.
That is one of the clearest beginner examples of why ALL exists.
ALL on a table versus ALL on columns
This is a very important practical distinction.
ALL(Table)
This removes filters from the entire table.
That means all the columns of that table are effectively cleared from the current filter context for that part of the calculation.
This is useful when you want the broadest possible version of that table.
ALL(Column)
This removes filters only from the specified column or columns.
That means other filters on other columns may still apply.
This is useful when you want more control.
For example:
- remove the category filter
- but keep the date filter
- keep the region filter
- keep the customer-segment filter
That is often a much better design than removing everything blindly.
A very practical rule is: use the narrowest version of ALL that solves the actual business question.
Why column-level ALL is often better
Beginners sometimes use ALL on a whole table when they only needed to clear one column.
That can create confusing results because the measure may remove more context than intended.
For example, suppose you want:
- category share of total revenue within the selected year
If you remove all filters from the entire sales table, you may accidentally lose more context than needed.
If you remove only the category filter, the measure can still respect:
- the selected year
- the selected region
- the selected customer segment
That is usually much closer to the real business need.
ALL and CALCULATE work together often
ALL is most commonly used inside CALCULATE.
That is because CALCULATE is the DAX function that changes filter context, and ALL is one of the tools used to define how that change should happen.
A practical way to think about the pattern is:
- CALCULATE changes the context
- ALL helps remove part of the existing context
That is why these functions appear together so often in real Power BI measures.
A practical benchmark example
Suppose a report page is filtered to:
- Year = 2026
- Region = South
- Product Category = Hardware
Now imagine you want one KPI that shows: total revenue for the South region in 2026, regardless of product category.
This is an ALL-style problem.
Why?
Because the current page includes a category filter, but your measure should ignore that one filter while keeping the others.
That is a classic example of using ALL on the relevant category field.
ALL versus REMOVEFILTERS
This is one of the most important practical comparisons.
Microsoft documents that ALL and its variants behave both as filter modifiers and as functions that can return table objects, while REMOVEFILTERS is specifically designed to clear filters. When REMOVEFILTERS is supported in your tool, Microsoft notes that it is often the better choice when the goal is simply to remove filters. citeturn723873search7turn723873search14
A practical beginner way to think about it is:
Use ALL when:
- you are following classic DAX patterns
- you need the table-returning behavior in a broader expression
- you are working through standard ALL-based examples and logic
- the table or column form of ALL is the clearest match for the pattern
Use REMOVEFILTERS when:
- your only goal is to clear filters
- you want the code to read more directly as filter removal
- you do not need ALL’s table-returning role
This is a very useful design distinction.
Why ALL sometimes behaves unexpectedly
The ALL function can confuse users because it does not always behave like “remove everything and ignore all filters forever.”
The final result still depends on:
- the model
- relationships
- which columns or tables are involved
- other filters still active
- the exact DAX expression
- how filters from the same table interact
One especially important concept Microsoft documents for ALL is auto-exist.
Auto-exist is relevant when multiple filters from the same table are involved, and it can make ALL behave differently than beginners expect because the engine optimizes to existing combinations rather than treating the filters as totally independent. citeturn723873search1turn723873search15
This is one reason why ALL can seem surprising in real reports.
The simple lesson is: ALL removes filters from the target table or column, but the final result still depends on the rest of the model and context.
A practical “same table” caution
Suppose you use:
- Product[Category]
- Product[Brand]
in the same report, and both are being filtered.
If you remove a filter from one of those columns while the other still shapes the table context, the result may not behave the way a beginner expects.
This is especially true when the model only has certain existing combinations of those fields.
That is why ALL should be tested in real visuals, not just written from memory.
Common business use cases
Category share of total
Examples:
- category revenue as a percentage of all revenue
- brand contribution to overall sales
- region share of total margin
ALL helps define the denominator.
Rankings
Examples:
- top customers across all customers
- product rank within the full category list
- rep performance ranking against the full team
ALL helps create the comparison base.
KPI benchmarks
Examples:
- selected region revenue versus company total
- selected product revenue versus full portfolio revenue
- current segment versus full population
ALL helps create the reference number.
Filter override logic
Examples:
- ignore product filter, keep date and region
- ignore one slicer to keep a stable benchmark
- compare selected result to the unfiltered total
These are everyday Power BI scenarios.
Common mistakes with ALL
Using ALL on an entire table when only one column should be cleared
This is very common.
It can remove too much context and make the measure less useful.
Using ALL without understanding the denominator
In percentage measures, the denominator logic should be very clear. If you do not know exactly what total you want, ALL can produce the wrong business answer.
Assuming ALL ignores everything everywhere
It removes the targeted filters, but the rest of the model and filter context still matter.
Ignoring auto-exist and same-table interactions
When multiple filters from the same table interact, ALL can feel surprising if you expect a completely isolated behavior.
Using ALL when REMOVEFILTERS would express the intention more clearly
In some models, REMOVEFILTERS may be the cleaner choice when the real goal is only filter removal.
A practical learning path for ALL
If you want to learn ALL well, this is a strong order.
Step 1: Start with a simple total measure
Create a basic measure like total revenue.
Step 2: Place it in a visual with categories
For example:
- revenue by category
- revenue by region
Step 3: Build a percentage-of-total measure
This is one of the clearest ways to see why ALL is useful.
Step 4: Test ALL on a column versus a table
Compare the results and observe how much context is being removed.
Step 5: Move into more advanced comparisons
Then use ALL for:
- rankings
- stable benchmark KPIs
- selective filter overrides
That is a much better path than trying to memorize abstract syntax alone.
Step-by-step workflow
If you want to use the ALL function correctly in DAX, this is a strong process.
Step 1: Define the business question
Ask: What should the measure compare the current result against?
Examples:
- total company revenue
- total category revenue
- all products
- all customers
- all time
- all regions
Step 2: Decide exactly which filter should be removed
Ask: Do I need to clear:
- one column
- a few columns
- or the whole table?
Use the narrowest option that solves the problem.
Step 3: Build the base measure first
Start with:
- total revenue
- total margin
- order count
- customer count
Do not build the full comparison formula immediately.
Step 4: Use ALL to define the broader context
Remove only the filters necessary for the comparison or denominator.
Step 5: Test the measure in multiple visuals
Check it in:
- a card
- a table
- a chart by category
- a filtered report page
This helps confirm that the business logic is actually correct.
FAQ
What does the ALL function do in DAX?
The ALL function removes filters from a table or specific columns, which lets a measure evaluate against a broader total or base context instead of the currently filtered subset only.
When should I use ALL in DAX?
Use ALL when you need a measure to ignore some existing filters, such as when calculating percentage of total, total company revenue, category contribution, ranking logic, or comparisons against an unfiltered base.
What is the difference between ALL and REMOVEFILTERS in DAX?
Both can be used to remove filters, but REMOVEFILTERS is often the clearer choice when your goal is specifically to clear filters, while ALL can also return a table in DAX expressions.
Why does ALL sometimes not behave the way I expect?
ALL can behave unexpectedly when model structure, filter context, or auto-exist interactions are involved, especially when multiple filters from the same table combine in ways that narrow the result differently than beginners expect.
Final thoughts
The ALL function in DAX is important because a lot of business reporting depends on comparing the current filtered answer to a broader total.
That is the main idea to remember.
A normal measure respects the current context. ALL helps you step outside part of that context so you can calculate:
- percentages of total
- broader comparisons
- rankings
- stable benchmark KPIs
- totals that ignore a specific filter
Once you understand ALL as a deliberate filter-removal tool, it becomes much easier to use correctly.
And once you start choosing carefully between ALL on a table, ALL on a column, and REMOVEFILTERS where appropriate, your DAX measures usually become both clearer and more trustworthy.