Overview
The CALCULATE function is the most powerful and fundamental function in Power BI DAX. It acts as the gateway to advanced data analysis because it allows you to modify or override the existing filter context of your report.
Think of it as a master controller: it evaluates a mathematical expression (like Sum, Average, or Count) but inside a newly defined set of custom rules/filters that you specify.