Calculates the variance (difference) between two members. The variance calculation recognizes the difference between accounts that are tagged in the database outline as "Expense" or "No Expense" and calculates the variance accordingly.
@VAR (mbrName1, mbrName2)
mbrName1 and mbrName2
Members from the same dimension whose variance results are to be calculated. The variance is derived by subtracting mbrName2 values from mbrName1, unless an account is tagged as "Expense", in which case mbrName1 values are subtracted from mbrName2.
The following example is based on the Sample Basic database. The variance between Actual and Budget is calculated as follows:
Variance = @VAR(Actual,Budget);
Sales is defined as "No Expense", whereas COGS is tagged as "Expense". This example produces the following report:
Year Product Market Sales COGS ===== ==== Actual 400855 179336 Budget 373080 158940 Variance 27775 (20396)