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,420 points
404 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,870 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
• 32,930 points
337 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
• 32,930 points
11,944 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
• 32,930 points
114 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,870 points
202 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,870 points
106 views
0 votes
1 answer

Using RELATED function in DAX with USERELATIONSHIP

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

answered Nov 17, 2020 in Power BI by anonymous
• 65,870 points
621 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,870 points
167 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,870 points
150 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,870 points
123 views