%TotalAmountSales = DIVIDE([TotalSalesAmount],
%SalesUnitedstates = DIVIDE([SalesAmountUnitedStates],
Why did we use CALCULATE in both of these DAX equations wherein why can’t we choose the denominator as TotalSales ?
Because we need to remove specific filters from our calculation, otherwise we will not get the correct numbers. Imagine this, the SUM of SalesAmount would SUM the whole column, but when it needs to divide against itself it would return 1. Because DAX calculates row by row. So we want column A1 to divide against the sum of A1 to A20. That’s why we need to apply ALL function to the denominator. We cannot use ALL on its own with SUM so we use CALCULATE. I hope this makes sense.