Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I was trying to use the quick measure to get the Correlation Coefficient but getting this error below.
category is STDID
X-Axis is AttendanceRate
Y-Axis is GWA
Error Message:
MdxScript(Model) (230, 3) Calculation error in measure 'Correlation_Coefficient ( Including 0 )'[Average of STRATTENDANCERATE and Average of strFinalGWA correlation for FullName]: An argument of function 'SQRT' has the wrong data type or the result is too large or too small.
My Initial conclusion (which not totally sure) is data type mis match since my GWA is example. 1.5, 1.25, 1.33 etc.
and my attendance rate is 98.00, 87.00, 99.44
and bunch of blanks both in GWA and AttendanceRate
Any workaround to resolve the error?
Should I remove those blanks affecting both GWA and AttendanceRate?
Appreciate the help a lot!
My Table shows like this:
Solved! Go to Solution.
Hi @v_mark yes, you're correct in your theory. The error looks to be driven by blanks / 0s and is causing that. If you are able to remove blanks / 0s either in the raw data, using Power Query, or other dax methods, I'd recommend doing this.
Also, I definitely recommend taking a look at this link that is likely to assist as well: https://exceltown.com/en/tutorials/power-bi/powerbi-com-and-power-bi-desktop/dax-query-language-for-...
And one other great little resource: https://community.powerbi.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/196274
Hope this helps mate.
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
Hi @v_mark yes, you're correct in your theory. The error looks to be driven by blanks / 0s and is causing that. If you are able to remove blanks / 0s either in the raw data, using Power Query, or other dax methods, I'd recommend doing this.
Also, I definitely recommend taking a look at this link that is likely to assist as well: https://exceltown.com/en/tutorials/power-bi/powerbi-com-and-power-bi-desktop/dax-query-language-for-...
And one other great little resource: https://community.powerbi.com/t5/Quick-Measures-Gallery/Correlation-coefficient/m-p/196274
Hope this helps mate.
Theo
If I have posted a response that resolves your question, please accept it as a solution to formally close the post.
Also, if you are as passionate about Power BI, DAX and data as I am, please feel free to reach out if you have any questions, queries, or if you simply want to connect and talk to another data geek!
Want to connect?www.linkedin.com/in/theoconias
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
98 | |
77 | |
66 | |
54 |
User | Count |
---|---|
144 | |
104 | |
101 | |
86 | |
64 |