Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Arnault_
Resolver III
Resolver III

DAX Calculate function with and without FILTER

Hi,

Is there any difference between the two following measures? I get the same results in my report, but I am wondering why I should use FILTER then.

Thanks in advance.

 

Total shipment / sea = 
CALCULATE (
    [Total shipment];
    FILTER ( 'DIM Transport'; 'DIM Transport'[mode_transport_STD] = "SEA" )
)
Total shipment / sea v2 = 
CALCULATE ( [Total shipment]; 'DIM Transport'[mode_transport_STD] = "SEA" )

 

1 ACCEPTED SOLUTION
Arnault_
Resolver III
Resolver III
2 REPLIES 2
Ashish_Mathur
Super User
Super User

Hi,

There are 3 triggers for usage of the FILTER() function

  1. When resolving a conflict - If the same field is placed in a slicer and in the filter argument of the CALCULATE() function, then if a FILTER() function is not used, precedence is given to the filter argument of the CALCULATE() function (completely ignoring the selection made by the end user in the slicer).  If the FILTER() function is used in the filter argument of the CALCULATE() function, then precedence is given to the selection made by the end user in the slicer.
  2. When giving rich filter conditions - Simple filter conditions such as column value > fixed value do not warrant usage of FILTER() function.  Rich filter conditions such as column value > column value or column value > measure or measure > measure require usage of the FILTER() function.
  3. When giving OR conditions - Even though one can specify unlimited filter conditions in the CALCULATE() function, they are all AND conditions by default.  To specify OR conditions, one must use the FILTER() function.  That being said, there is a way to bypass the FILTER() function by using the || symbol to specify OR conditions.

Hope this helps.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Arnault_
Resolver III
Resolver III

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.