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 the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.