There's more...

Now, we know that there is a strong correlation between Wages and Sales when Wages is viewed as a 3-month leading indicator and we deseasonalize the sales data. Our next task is to determine how to estimate future quarter sales and regression test our estimation formula. To accomplish this, do the following:

  1. Create the following measures:
Sales4Est =     VAR __YearQuarter = MAX('R08_Estimates'[YearQuarter])RETURN    SUMX(FILTER('R08_Sales','R08_Sales'[YearQuarter]=__YearQuarter),'R08_Sales'[Sales])Slope =     VAR __YearQuarter = MAX('R08_Sales'[YearQuarter])    VAR __SeasonalTable =         FILTER(            ADDCOLUMNS(                SELECTCOLUMNS(                    ALL('R08_Sales'),                    "YearQuarter",'R08_Sales'[YearQuarter],                    "Quarter",'R08_Sales'[Quarter],                    "X",'R08_Sales'[Sales]),

Get DAX Cookbook now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.