Forum Discussion
sathishsam
Helper II
2 years agoIs 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...
talespin
Solution Sage
2 years agoHi sathishsam,
Calculate ( SUM(TableA[Col1], TableA[Col2] = "Some Filter", TableB[Col1] = "Some Filter")
Inside a calculate this filter (TableB[Col1] = "Some Filter") translates to
FILTER( ALL(TableB[Col1]), TableB[Col1] = "Some Filter")
ALL removes any filter on Col1 and creates a new filter.
FILTER(TableB, TableB[Col1] = "Some Filter")
This is different
If there is any filter coming from outside, TableB will contains rows corresponding to that filter and that will intersect with filter "Some Filter".
In DAX Filters are tables.