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

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.

Reply
Nicho247
Helper III
Helper III

displayed table values are not matching source data

Hello -

 

Difficult problem to describe.

 

I have a SQL query which is returning some data. In the SQL query I have cast the column in question as a decimal(18,2). I have then pushed this into excel via a database connection. I have then pushed this file into power bi desktop. For a transform i set the data type to fixed decimal number. When I create a table in power bi, the values displayed do not match the excel file nor what is returned in sql. Below is what is copy/pasted. However here is a screenshot. What is going on?

 
 

Annotation 2020-07-22 153109.png

 

SQL = -153548.08

Excel =  $(153,548.08) (formatted as accounting)

Power BI = -153548.08

1 ACCEPTED SOLUTION

That's the way decimals work. apply formatting to it if you want to display only two significant digits.

View solution in original post

5 REPLIES 5
Icey
Community Support
Community Support

Hi @Nicho247 ,

 

Is this problem solved?


If it is solved, please always accept the replies making sense as solution to your question so that people who may have the same question can get the solution directly.


If not, please let me know.

 


Best Regards,
Icey

Hi @Icey 

 

Yes, though I am dissatified with the explanation. If formatting is set to auto, power bi may or may not convert 2 decimals to 10 decimals without cause. I fixed this by changing from auto to '2' even though the raw data is fixed decimal number & was fixed at 2 upstream through SQL server.

 

Annotation 2020-07-30 092527.png

 

N

lbendlin
Super User
Super User

where exactly is the mismatch?

the screenshot is what is displayed visually. but if i copy/paste it from power bi...it is correct.

 

screenshot reads

-153548.0799999999999

actual value is

-153548.08

 

N

 

That's the way decimals work. apply formatting to it if you want to display only two significant digits.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

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