hello,
What is the difference between the removefilters function and the ALL function?
Thanks
Hi @arkiboys
Check out the course Mastering DAX Calculations
Introducing Simple Table Functions section
remove filter and all is all explained in the course.
thanks
Keith
@arkiboys REMOVEFILTERS is a CALCULATE modifier whereas ALL is both a CALCULATE modifier and a table function.
When ALL is used in the 2nd, 3rd, 4th…nth argument of CALCULATE alone (without pairing with any other function) then it acts like a Filter remover when it is paired in 1st, 2nd, 3rd, 4th…nth argument of CALCULATE with other functions then it acts like a table function and returns unique values or just the whole table
RMF vs ALL =
CALCULATE (
[Sales Amount],
REMOVEFILTERS ( Products[Brand] ),
ALL ( Products[Brand] )
-- When used like this there is no difference at all, pun not intended
)
RMF vs ALL =
CALCULATE (
[Sales Amount],
FILTER (
ALL ( Products[Brand] ),
Products[Brand] = "Contoso"
)
-- When used like this then ALL returns unique values
-- Can't use REMOVEFILTERS instead of ALL here
)