Forum Discussion
sathishsam
2 years agoHelper II
Is using Filter inside the Calculate makes any difference?
I have a DAX function written in 2 ways, i see that the 2nd one performs better always, then my question is where should i use the first once 1) Calculate ( SUM(TableA[Col1], TableA[Col2] = "Some...
Anonymous
2 years agoNot applicable
Hi sathishsam
The first parameter of the FILTER function is the table, and the second parameter is the filter condition, for example:
My sample:
Measure:
Measure = CALCULATE(COUNT('Date'[Date]), FILTER('Date', [Date] >= DATE(2023, 2, 22) && [Date] <= TODAY()))
Result:
My formula filters out dates in the range of February 22, 2023 to today to calculate how many dates there are in total.
For more details about Funtions I used, you can read related document link:
FILTER function (DAX) - DAX | Microsoft Learn
COUNT function (DAX) - DAX | Microsoft Learn
CALCULATE function (DAX) - DAX | Microsoft Learn
Best Regards,
Community Support Team _Yuliax
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.