Filter Function in Power BI DAX

Опубликовано: 04 Март 2025
на канале: PowerBI Zone
1,302
55

#Filterfunction
#dax
#powerBI
#powerbizone
This video explains the usage of Filter Function in Power BI DAX.
Syntax: FILTER(table, filter)
Parameters:
table: The table to be filtered.
filter A Boolean expression that is to be evaluated for each row of the table. For example, [Amount] = 0 or [Region] = "France"

Return Type :
A table containing only the filtered rows

Remarks
1.You can use FILTER to reduce the number of rows in the table that you are working with.
2.FILTER is generally not used independently, but as a function that is embedded in other functions that require a table as an argument.

Usage of Filter Function In DAX:FILTER can be used to create a separate table or can be used in measure.


For best practices when using FILTER:
https://docs.microsoft.com/en-us/dax/...

Usage of Calculate Function with and without FILTER function

1.FILTER retains and interacts with initial filter context, while filter expression used directly in CALCULATE ignores it.
2.The measure without FILTER is faster
More details in this blogpost https://powerbizone.com/filter-functi...

Chapters:
0:00 An introduction to DAX Filter Function in Power BI (Theory)
2:03 Practical Demonstration in PBI Desktop
4:32 Example 1:Creating Tables using Filter function
6:18 Example 2:Creating Tables selecting only few Columns
8:39 Example 3 :Creating Measure using Filter
10:37 Example 4:Creating Measure without using Filter keyword