Forum Discussion
Pearson Coefficient correlation for Performance trend
- 1 year ago
Dimitri70 - Have you tried the measure mentioned in this blog?
https://xxlbi.com/blog/pearson-correlation-coefficient-in-dax/
It's from a very skilled Microsoft MVP.
Hopefully this helps you achieve the answer you are looking for.
If I answered your question please mark my post as the solution, it helps others with the same challenge find the answer!
Hello, thank you for your help and for sharing the link.
I was able to copy the code and adapt it to my table, and the results appear satisfactory. However, I am facing an issue. My objective is to analyze the delivery performance trend of my suppliers over the last 12 months. In some cases, certain suppliers have only delivered for 3 months, achieving a 100% delivery performance. Despite this, the coefficient of correlation is showing -0.89. I suspect this may be due to the months without deliveries being counted as 0. Is there a way to exclude the months with no deliveries from the analysis?
| Month | Count on time | Count total | DP |
| 5/1/2024 | |||
| 6/1/2024 | |||
| 7/1/2024 | |||
| 8/1/2024 | |||
| 9/1/2024 | |||
| ######## | |||
| ######## | 2 | 2 | 100% |
| ######## | 4 | 4 | 100% |
| 1/1/2025 | 4 | 4 | 100% |
| 2/1/2025 | |||
| 3/1/2025 | |||
| 4/1/2025 | |||
| 5/1/2025 |
here my Dax formula: