CALCULATE

Formulas / CALCULATE
Evaluate an expression.
CALCULATE(expression, filter1, filter2, …)
  • Expression - the expression to be evaluated
  • Filter1, Filter2,… - [OPTIONAL] define filters or filter modifier functions

Examples

  • CALCULATE(SUM('Table'[Column1]), 'Table'[Column2]="Value")

    The CALCULATE function can be used to modify the filter context of an expression. For example, this formula evaluates the second expression with an additional filter context:

  • 'Table'[Column2]="Value">

Summary

The CALCULATE function is a powerful tool for evaluating expressions in row context. It evaluates an expression in a modified filter context, and returns the value of the expression.

  • CALCULATE is an expression evaluation function that modifies the filter context when used, allowing for more complex filter scenarios to be created.
  • REMOVEFILTERS removes all filters from the filter context, effectively resetting the state of the filter context.


Frequently Asked Questions

What is the CALCULATE function?
The CALCULATE function is an expression evaluation function in Power BI. It modifies the filter context when used.
What does the CALCULATE function do?
The CALCULATE function is used to evaluate an expression with the modified filter context. It can be used to create complex expressions and modify the filter context to create more accurate results.
How do I use the CALCULATE function?
To use the CALCULATE function, you can enter the expression into a cell in Power BI or write it into the formula bar. You can also use existing functions to create more complex expressions. The CALCULATE function should be used with the modified filter context to create more accurate results.
What are some examples of using the CALCULATE function?
  • Calculating the total sales of a product over a specific period of time
  • Calculating the average price of a product over a specific period of time
  • Calculating the total number of orders for a specific product within a certain time period

Make Better Decisions
With Data

Analyze data, automate reports and create live dashboards
for all your business applications, without code. Get unlimited access free for 14 days.