Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Anonymous
Not applicable

An argument of function 'SQRT' has the wrong data type or the result is too large or too small.

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

BlueWhite111_0-1679512939111.png

Sample file Data

https://www.dropbox.com/s/xakasafnr11n3q9/SampleData.pbix?dl=0 

 

1 ACCEPTED 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.

sevenhills_0-1679523142474.png

 

c. Add date to the same the table visual and you see the error.

 

sevenhills_1-1679523168500.png

 

sevenhills_2-1679523176115.png

 

d. now, remove the dummy measure and you can see the data as negative values.

sevenhills_3-1679523200379.png

 

Hope this helps!

View solution in original post

5 REPLIES 5
Greg_Deckler
Community Champion
Community Champion

@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



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
sevenhills
Super User
Super User

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.

sevenhills_0-1679523142474.png

 

c. Add date to the same the table visual and you see the error.

 

sevenhills_1-1679523168500.png

 

sevenhills_2-1679523176115.png

 

d. now, remove the dummy measure and you can see the data as negative values.

sevenhills_3-1679523200379.png

 

Hope this helps!

Anonymous
Not applicable

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 ... 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

Find out what's new and trending in the Fabric community.

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.