The CALCULATE() function is the most important function in DAX as it enables the author to modify the filter context under which a measure is evaluated. Regardless of the fields used and filters applied in reports, the filter parameter input(s) to CALCULATE() will be applied. Specifically, the CALCULATE() function will either add a filter to a measure expression (for example, Color = "Red"), ignore the filters from a table or column (for example, ALL(Product)), or update/overwrite the filters applied within a report to the filter parameter specified in CALCULATE().
The syntax of CALCULATE() is the following CALCULATE(<expression>, <filter1>, <filter2>). Any number of filter parameters can be specified including no ...