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.
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?
SQL = -153548.08
Excel = $(153,548.08) (formatted as accounting)
Power BI = -153548.08
Solved! Go to Solution.
That's the way decimals work. apply formatting to it if you want to display only two significant digits.
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.
N
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.
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 |
---|---|
110 | |
100 | |
80 | |
64 | |
58 |
User | Count |
---|---|
148 | |
111 | |
93 | |
84 | |
66 |