DAX code
Variance =
[Total Sales] - SUM('Budget'[BudgetAmount])
Variance % =
DIVIDE([Variance], SUM('Budget'[BudgetAmount]))
Generic variance measures comparing any two values, such as actual against budget or this year against last year.
Type your table and column names once. Every measure below updates.
Variance =
[Total Sales] - SUM('Budget'[BudgetAmount])
Variance % =
DIVIDE([Variance], SUM('Budget'[BudgetAmount]))
Swap the two sides of the subtraction to compare any pair of measures, not just sales against budget.
Browse all 175 measures in the Power BI DAX Measures Library, or search the library for something similar to Variance and Variance %.