Complete the code to calculate total sales using SUM function.
Total Sales = SUM([1])The SUM function needs a numeric column to add up. Sales[Amount] contains the sales values.
Complete the code to calculate average sales per customer.
Average Sales = AVERAGEX([1], Sales[Amount])AVERAGEX iterates over Customers to calculate average sales per customer.
Fix the error in the code to calculate sales for the current year.
Sales CY = CALCULATE(SUM(Sales[Amount]), YEAR(Sales[Date]) = [1])YEAR(TODAY()) extracts the current year number to filter sales by year.
Fill both blanks to calculate sales growth percentage compared to previous year.
Sales Growth % = DIVIDE(SUM(Sales[Amount]) - CALCULATE(SUM(Sales[Amount]), [1]), CALCULATE(SUM(Sales[Amount]), [2]))
PREVIOUSYEAR filters sales to last year for both numerator and denominator calculations.
Fill all three blanks to create a measure that calculates cumulative sales up to the selected date.
Cumulative Sales = CALCULATE(SUM(Sales[Amount]), FILTER(ALL(Sales[Date]), Sales[Date] [1] MAX(Sales[Date]) [2] [3]))
The FILTER keeps all dates less than or equal to the max date, combining conditions with AND (&&).