Year-over-Year (YoY) is a measure of growth. It is obtained by subtracting the actual sum of the previous year from the actual sum.
If the result is positive, it reflects an increase in actual, and if it is negative, it reflects a decrease in actual, i.e. if we calculate year-over-year as −
year-over-year = (actual sum –prior year actual sum)
In the financial data, accounts such as the expense accounts will have debit (positive) amounts and the revenue accounts will have credit (negative) amounts. Hence, for the expense accounts, the above formula works fine.
However, for the revenue accounts, it should be the reverse, i.e.
Hence for the revenue accounts, you have to calculate year-over-year as −
year-over-year = -(actual sum – prior year actual sum)
You can create Year-over-Year measure with the following DAX formula −
YoY:=IF(CONTAINS(Accounts, Accounts[Class],"Net Revenue"),-([Actual Sum]-[Prior Year Actual Sum]), [Actual Sum]-[Prior Year Actual Sum])
In the above DAX formula −
DAX CONTAINS function returns TRUE, if a row has "Net Revenue" in the column Class in the Accounts table.
DAX IF function then returns –([Actual Sum]-[ Prior Year Actual Sum]).
Otherwise, DAX IF function returns [Actual Sum]-[ Prior Year Actual Sum].
You can represent Year-over-Year as a percentage with the ratio −
(YoY) / (Prior Year Actual Sum)
You can create the Year-over-Year Percentage measure with the following DAX formula −
YoY %:=IF([Prior Year Actual Sum], [YoY] / ABS([Prior Year Actual Sum]),BLANK())
DAX IF function is used in the above formula to ensure that there is no division by zero.
Create a Power PivotTable as follows −
You can create Budget Year-over-Year measure as follows −
Budget YoY: = IF(CONTAINS(Accounts,Accounts[Class],"Net Revenue"), - ([Budget Sum] - [Prior Year Actual Sum]), [Budget Sum] - [Prior Year Actual Sum])
You can create Budget Year-over-Year Percentage measure as follows −
Budget YoY %:=IF([Prior Year Actual Sum] , [Budget YoY] / ABS ([Prior Year Actual Sum]) , BLANK())
Create a Power PivotTable as follows −
You can create Forecast Year-over-Year measure as follows −
Forecast YoY:=IF(CONTAINS(Accounts,Accounts[Class],"Net Revenue"), - ([Forecast Sum] - [Prior Year Actual Sum]), [Forecast Sum] - [Prior Year Actual Sum])
You can create Forecast Year-over-Year Percentage measure as follows −
Forecast YoY %:=IF([Prior Year Actual Sum],[Forecast YoY]/ABS([Prior Year Actual Sum]),BLANK())
Create a Power PivotTable as follows −