Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
I need help understanding when one should use the filter function within calculate. I have the two following DAX formulas:
(a)
Solved! Go to Solution.
Your first measure will return a value for the row where in both of these conditions are satisfied: FactScoreChange[Name] = personName and FactScoreChange[Year Range] = "2022-2023". It will return blank for everything else. It guarantees the user selection is preserved. Your second measure will return the filtered value for all rows of Year Range and Name
Which one to choose depends on your use case. The second one can be used to compare a specific filtered value vs all other values for different rows - for example Aparel and EMEA vs Apparel and APAC. As a best practice though, filtering a table is to be avoided and filtering columns instead. You can use KEEPFILTERS on column to preserve the user selection instead of FILTER. The perfomance difference between the two is neglible on small tables.
Hi @brennahurley ,
We haven’t received an update from you in some time. Could you please let us know if the issue has been resolved?
If you still require support, please let us know, we are happy to assist you.
Thank you.
Hi @brennahurley ,
Thanks for reaching out to the Microsoft fabric community forum. Also thank you @danextian , @Ashish_Mathur and @lbendlin for your helpful response.
I wanted to check if you had the opportunity to review the information provided . If you still require support, please let us know, we are happy to assist you.
Thank you.
Your first measure will return a value for the row where in both of these conditions are satisfied: FactScoreChange[Name] = personName and FactScoreChange[Year Range] = "2022-2023". It will return blank for everything else. It guarantees the user selection is preserved. Your second measure will return the filtered value for all rows of Year Range and Name
Which one to choose depends on your use case. The second one can be used to compare a specific filtered value vs all other values for different rows - for example Aparel and EMEA vs Apparel and APAC. As a best practice though, filtering a table is to be avoided and filtering columns instead. You can use KEEPFILTERS on column to preserve the user selection instead of FILTER. The perfomance difference between the two is neglible on small tables.
Hi,
You do not need to use a FILTER() function here. A FILTER() is used when you have to compare a measure to a measure, column to a column or column to a measure. Since you are comparing a column to a fixed value, the FILTER() function is not required.
They are not doing the same thing.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.