Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.
When we working with Power BI, we often want to control what data we see. Think of it like looking at the world through different glasses. Some glasses show everything, some show only specific things, and some block everything else except one thing.
That’s exactly what DAX filter functions do, they decide what data should be visible for your calculation.
In this blog, I will walk you through the 5 most important filter functions in DAX
We will go step by step, with examples, real world comparisons, and easy rules on when to use each.
What it does: FILTER allows you to select precisely which rows to retain.
Example: Suppose you have a jar containing candies of various colours. If you say, “I only want red candies,” then FILTER will only keep the red ones for you.
DAX Example: FILTER (Table_Jar, Table_Jar[CandyColour] = “Red”) --> This means: From the Table_Jar table, only keep candies where candy colour = Red.
When to use:
What it does: ALL removes filters, like wiping the slate clean
Example: Imagine you’re playing hide and seek. If you close your eyes and say “I don’t care where anyone is hiding, show me everyone”, that’s ALL.
DAX Example: CALCULATE(SUM(Sales[Amount]), ALL(Sales)) --> This ignores all filters and displays the total sales regardless of what filter is used in the report.
When to use:
What it does: Removes all filters except the ones you keep it.
Example: You are in a candy shop. You say, “Don’t care about candy colour or size, but keep the brand filter.” That’s ALLEXCEPT.
DAX Example: CALCULATE(SUM(Table_Jar[SalesAmount]), ALLEXCEPT(Table_Jar, Table_Jar[Brand])) --> This keeps only the Product filter, but ignores everything else.
When to use:
What it does: ALLSELECTED respects the user’s selection in visuals but removes filters within.
Example: You are in a candy shop. You say to the shopkeeper, "I don't want to see anything except chocolates and lollipops today. Now, of those two, show me the totals."
DAX Example: CALCULATE(SUM(Table_Jar[SalesAmount]), ALLSELECTED(Table_Jar)) --> Use ALLSELECTED when you need to calculate based on what people selected in slicers or visuals.
When to use:
What it does: REMOVEFILTERS remove/clear filters from specific columns or tables.
Example: You have a drawing book. Someone put stickers on certain pages. REMOVEFILTERS means peeling off those stickers so you can see the full picture.
DAX Example: CALCULATE(SUM(Sales[Amount]), REMOVEFILTERS(Sales[Region])) --> This clears the Region filter but keeps others.
When to use:
Function | What It Does | Example Use |
FILTER | Keeps only rows that meet a condition | Table_Jar[CandyColour] = “Red” |
ALL | Removes all filters | Grand Total |
ALLEXCEPT | Removes all filters except chosen ones | Total by Brand |
ALLSELECTED | Removes filters but respects user selections | % of Selected Total |
REMOVEFILTERS | Clears filters from specific columns/tables | Ignore only Region filter |
DAX filter functions may sound complex at first, but they are just like rules for how you want to look at your data.
If you remember the candy shop examples, you will never forget them:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.