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.
Hi Experts
I am getting the following error on my DAX Measure cannot see hot to resolve it
Measure
Correlation Coefficent 4
and
FAME0/Soybean Oil M00 Filled 90 Day Rolling
See image of error message
Sample file Data
https://www.dropbox.com/s/xakasafnr11n3q9/SampleData.pbix?dl=0
Solved! Go to Solution.
To prove, let us see in details on how to get error:
a. Create a dummy measure to test
Dummy Test Measure = SQRT ( '02 | DAX Measues Correlation Coefficent'[Correlation Coefficent 4] )
b. Create a new page and add a table visual.
c. Add date to the same the table visual and you see the error.
d. now, remove the dummy measure and you can see the data as negative values.
Hope this helps!
@Anonymous SQRT of a negative number is simply i multiplied by the SQRT of the absolute value. Where i is the square root of -1 (imaginary). I have a version of SQRT that can handle complex numbers: IMSQRT - Microsoft Power BI Community
Reason: you are doing SQRT on negative values, in your case.
To prove, let us see in details on how to get error:
a. Create a dummy measure to test
Dummy Test Measure = SQRT ( '02 | DAX Measues Correlation Coefficent'[Correlation Coefficent 4] )
b. Create a new page and add a table visual.
c. Add date to the same the table visual and you see the error.
d. now, remove the dummy measure and you can see the data as negative values.
Hope this helps!
Hi sir that helps but how do I amend correlation coefficient 4. To make my messure work.
SQRT - by default, we cannot find the square root of a negative number. You can google for details "SQRT negative number"
Now you need to look your DAX business logic and make sure the values used in SQRT are positive values.
Technically, you can use ABS to get always positive value, but not sure how it effects and what the business logic needs are ...
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 | |
100 | |
86 | |
64 |