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
StephenK
Resolver I
Resolver I

Inaccurate Decimal Numbers

Can someone explain this to me?

I have an excel table that i have imported into power query. 

I have a column [Current Score] with datatype decimal number. (See green highlighted column and note the values 1.83333333 and especially the 2.55) 

I apply a split column by first four characters to truncate to two decimals without rounding. Now note the 1.83 and the 2.55 which is now 2.54. 

 

screen1.pngscreen2.png

 

To make it even more confusing, the value in the excel table is 2.55 not 2.549999999999998. Does anyone know why Power Query would be doing this? It creates a serious data integrity problem.

1 ACCEPTED SOLUTION
Jimmy801
Community Champion
Community Champion

Hello @StephenK 

 

I just can confirm you that it's like that. It's really weird. Try to open a ticket.

However there are some workarounds. Transform you raw data (without any changed type) with the round-function and put 10.

Jimmy801_0-1615054716637.png

or you transform it and multiply your data with 1

Jimmy801_1-1615054893308.png

 

In the other workarounds you have to change your Excel. You can save your workbook as CSV-file or format your content as text.

 

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

View solution in original post

4 REPLIES 4
Jimmy801
Community Champion
Community Champion

Hello @StephenK 

 

I just can confirm you that it's like that. It's really weird. Try to open a ticket.

However there are some workarounds. Transform you raw data (without any changed type) with the round-function and put 10.

Jimmy801_0-1615054716637.png

or you transform it and multiply your data with 1

Jimmy801_1-1615054893308.png

 

In the other workarounds you have to change your Excel. You can save your workbook as CSV-file or format your content as text.

 

If this post helps or solves your problem, please mark it as solution (to help other users find useful content and to acknowledge the work of users that helped you)
Kudoes are nice too

Have fun

Jimmy

@Jimmy801 thanks for the workaround! Seemed to do the trick. Really appreciate it!

 

Still kinda frustrated though--would like to hear from anyone on the Power BI dev team about this. It's concerning to me that queries become innacurate as a result of this bug. One would think that there would not be any data integrity issues between Excel and Power BI given they are both Microsoft products.

 

If we can't count on the platform to at least maintain accurate queries why would we use it...

 

 

Hello @StephenK 

 

I completely agree. I can try to forward this somehow. However I marked my workaround as solution.

 

BR

 

Jimmy

HotChilli
Super User
Super User

Can you show us the Advanced editor code (including the split column) please?

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.

Top Solution Authors
Top Kudoed Authors