Power BI Desktop and the Power BI Service provide advanced analytics features such as Forecasting, Clustering, and Quick Insights that go far beyond traditional BI reporting of historical data. However, many valuable mathematical and statistical analyses such as Correlation Coefficients and Chi-Square Tests and are only possible by embedding the logic of these methodologies into DAX measures. Aligning these analyses to support specific business questions can generate new insights and provide a higher level of validation and confidence in business decisions.
In this recipe DAX measures are built into a Power BI model to calculate the correlation coefficient of two variables. Additionally, an example of computing the Goodness-of-Fit test statistic in validating a model is provided.