Power BI is turning 10! Tune in for a special live episode on July 24 with behind-the-scenes stories, product evolution highlights, and a sneak peek at what’s in store for the future.
Save the dateEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
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 ...
User | Count |
---|---|
76 | |
75 | |
46 | |
31 | |
27 |
User | Count |
---|---|
99 | |
91 | |
51 | |
49 | |
45 |