DAX Calculate function with and without FILTER

0 votes

Can someone explain the difference in the results of the CALCULATE function when using it with and without FILTER function? 

Given-below the scenario:

Measure21 = CALCULATE([A], 'FactTable'[Color]="Blue")

Measure12 = CALCULATE([A], FILTER('FactTable', 'FactTable'[Color]="Blue")
Sep 24, 2020 in Power BI by anonymous
• 10,480 points
3,984 views

1 answer to this question.

0 votes

You could make [Measure12] return the same results as this: 

CALCULATE([X], FILTER(ALL('FactTable'[Color]), 'FactTable'[Color]="Blue")

Using FILTER has a significant performance impact, which can be clearly seen looking at query plans and utilization of Storage Engine vs Formula Engine.

FILTER retains and iteracts with initial filter context, while filter expression used directly in CALCULATE ignores it.

answered Sep 24, 2020 by Gitika
• 65,770 points

Related Questions In Power BI

0 votes
1 answer

Calculate and filter function - DAX

Hi Praneeth, Calculate () by default perform calculations ...READ MORE

answered May 2, 2019 in Power BI by Cherukuri
• 33,030 points
1,321 views
0 votes
1 answer
0 votes
1 answer

How to calculate cumulative Total and % in DAX?

Hi, If your table is ready with percentage ...READ MORE

answered Mar 18, 2019 in Power BI by Cherukuri
• 33,030 points
19,019 views
0 votes
1 answer

calculation with condition and filter

Hi Preethi, Follow the below steps: 1. Create a ...READ MORE

answered May 2, 2019 in Power BI by Cherukuri
• 33,030 points
888 views
0 votes
1 answer

Using DAX calculation how to calculate monthly budget till today in power bi Desktop?

You can make use of this: MTD Budget ...READ MORE

answered Sep 24, 2020 in Power BI by Gitika
• 65,770 points
1,840 views
0 votes
1 answer

DAX Userelationship function

 You need a way for the measure ...READ MORE

answered Oct 5, 2020 in Power BI by Gitika
• 65,770 points
1,156 views
0 votes
1 answer

Using RELATED function in DAX with USERELATIONSHIP

Here's an example using the AdventureWorksDW data ...READ MORE

answered Nov 18, 2020 in Power BI by anonymous
• 65,770 points
4,929 views
0 votes
1 answer

How to restart running total column with Power BI Desktop DAX?

This is not only a running total ...READ MORE

answered Dec 8, 2020 in Power BI by Gitika
• 65,770 points
1,880 views
0 votes
1 answer

Understanding the DAX CALCULATE function

Using the CALCULATE function makes the DAX perform a context ...READ MORE

answered Sep 28, 2020 in Power BI by Gitika
• 65,770 points
1,582 views
0 votes
1 answer

DAX function to create LY Measure without date dimension

It should be fairly simple (sumx of ...READ MORE

answered Oct 1, 2020 in Power BI by Gitika
• 65,770 points
938 views
webinar REGISTER FOR FREE WEBINAR X
REGISTER NOW
webinar_success Thank you for registering Join Edureka Meetup community for 100+ Free Webinars each month JOIN MEETUP GROUP