Complete the DAX formula to calculate total sales.
Total Sales = SUM([1])The SUM function adds all values in the Sales[Amount] column, giving total sales.
Complete the DAX formula to calculate average sales per customer.
Average Sales = DIVIDE(SUM(Sales[Amount]), [1])DISTINCTCOUNT(Sales[CustomerID]) counts unique customers, so dividing total sales by this gives average sales per customer.
Fix the error in this DAX formula to calculate sales growth percentage.
Sales Growth % = DIVIDE(SUM(Sales[Amount]) [1] SUM(PreviousSales[Amount]), SUM(PreviousSales[Amount]))The formula subtracts last year's sales from this year's sales. The minus sign - is needed to find the difference.
Fill both blanks to create a measure that filters sales for the current year only.
Current Year Sales = CALCULATE(SUM(Sales[Amount]), [1](Sales, YEAR(Sales[Date]) = YEAR([2]())))
FILTER applies a condition to the Sales table, and NOW() returns the current date. Using YEAR(NOW()) gets the current year to filter sales.
Fill all three blanks to create a measure that calculates the percentage of total sales for each product category.
Category Sales % = [1](SUM(Sales[Amount]), CALCULATE(SUM(Sales[Amount]), ALL([2])), [3]) * 100
ALL(Products[Category]) removes filters to get total sales. IFERROR handles division errors by returning 0 if error occurs.