Statistical analysis, beyond basic measures, is typically implemented outside of business intelligence data models via data analytics professionals and dedicated statistics and data science applications. When possible, however, it's much more efficient to leverage existing data models, Power BI skills, and the features used for other Power BI reports and dashboards, such as the analytics pane described earlier in this chapter.
In this recipe, the data points supporting a linear regression model are created from an existing Power BI data model. This model is then analyzed and described via DAX measures with values such as slope, Y intercept, and the Z-score for residuals. Finally, a rich report page is constructed to visualize the strength and accuracy of the regression model and to detect outliers. See the How it works... section...