0% found this document useful (0 votes)
17 views9 pages

Updated Power BI DAX Filter Functions

This guide provides a comprehensive overview of Power BI DAX filter functions, emphasizing their role in controlling data context and performing advanced calculations. Key functions discussed include CALCULATE for modifying filter contexts, FILTER for creating dynamic tables, and ALL, ALLEXCEPT, and ALLSELECTED for managing filters strategically. The document concludes by highlighting the importance of these functions in enhancing Power BI reports.

Uploaded by

jikih88235
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views9 pages

Updated Power BI DAX Filter Functions

This guide provides a comprehensive overview of Power BI DAX filter functions, emphasizing their role in controlling data context and performing advanced calculations. Key functions discussed include CALCULATE for modifying filter contexts, FILTER for creating dynamic tables, and ALL, ALLEXCEPT, and ALLSELECTED for managing filters strategically. The document concludes by highlighting the importance of these functions in enhancing Power BI reports.

Uploaded by

jikih88235
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PPTX, PDF, TXT or read online on Scribd
You are on page 1/ 9

Power BI DAX Filter

Functions - Complete
Guide 🚀
Control Your Data, Master Your Calculations. This guide
provides a complete overview of Power BI DAX filter
functions. Learn how to control data and master your
calculations. Understand the importance and applications of
each function.
by Adhiraj Ojha
Introduction to DAX Filter
Functions
DAX filter functions control the data context for calculations.
Key benefits include applying filters dynamically. You can
ignore or modify existing report filters. Perform advanced
calculations based on filtered data.

Dynamic Measures Filter Modification

Apply filters Ignore or modify


dynamically in existing report filters.
measures.
Advanced Calculations

Perform advanced calculations on filtered data.


The CALCULATE Function -
Foundation of Filtering
CALCULATE evaluates an expression in a modified filter
context. The syntax is CALCULATE(expression, filter1,
filter2, ...). It modifies the filter context. This includes sales
from specific categories. Use CALCULATE to modify the filter
context.

Expression Evaluation Filter Modification

Evaluates expressions. Modifies filter context.

Context Control

Controls data context.


FILTER Function - Creating Dynamic Tables
FILTER returns a table with rows meeting a specified filter expression. The syntax is FILTER(table, filter
expression). Use FILTER to define subsets of tables. For example, use it to extract high-value customers.

Syntax Returns Table

FILTER(table, filter expression) Returns a table based on filter


ALL, ALLEXCEPT, and
ALLSELECTED - Ignoring Filters
ALL returns all rows in a table, ignoring filters. ALLEXCEPT removes
filters except those on specified columns. ALLSELECTED preserves
user-applied filters. Use these to strategically remove or preserve
filters.
ALL

Ignores all filters.

ALLEXCEPT

Ignores all except specified.

ALLSELECTED

Preserves user filters.


Examples with ALL,
ALLEXCEPT, and
ALLSELECTED
Use ALL for percentage of total sales, ignoring filters. ALLEXCEPT
is good for sales by region, removing product filters. Use
ALLSELECTED to get sales by selected category while keeping
category filter intact.
Percentage of Total

Sales by Region

Sales by Category
LOOKUPVALUE() – Fetch Values Based on Conditions

🔹 LOOKUPVALUE() retrieves a specific column value based on a condition.

📌 Syntax:
LOOKUPVALUE(Result_Column, Search_Column, Search_Value)

📌 Example:
Get discount percentage based on customer category:

DiscountPercent = LOOKUPVALUE(Discounts[Percentage], Discounts[Category],


Sales[Customer Category])

✅ Use Case: Fetching related data without relationships (e.g., fetching product
price from another table).
KEEPFILTERS() – Preserve Existing Filters

🔹 KEEPFILTERS() ensures that existing filters remain active while applying new filters.

📌 Syntax:
KEEPFILTERS(Expression)

📌 Example:
Get high-value customers without overriding slicers:

HighValueCustomers = CALCULATE(SUM(Sales[Revenue]), KEEPFILTERS(Sales[Revenue] > 50000

✅ Use Case: Combining multiple filters dynamically in reports.


Conclusion
DAX filter functions are essential for Power BI analysis.
CALCULATE modifies filter context. FILTER creates dynamic
tables. ALL, ALLEXCEPT, ALLSELECTED strategically remove
filters. Use these functions to enhance your Power BI reports.

You might also like