Forum Discussion

DouweMeer's avatar
DouweMeer
Impactful Individual
7 years ago
Solved

Floating point error when importing data

So I do understand where a floating point error comes from and stuff. But I can't fix it. The problem exist as we are using the American numbers with the '.' as a decimal. Some of our product code are written as ###.### (Where # is a number between 0 and 9). When I import them to Power BI, some are imported with the correct format, other will get something like ###.###00000000000#. 

 

These article codes are set to number as soon as they reach the 'navigation' step. Then it is already too late.I tried several ways to get around this. I changed my formal cells in the source file, which is Excel, and change that to text. Didn't work. I disabled the check box that Power BI give an estimate on the data type of a field. Didn't worked either. Tried to change the data type to text via Power Query in the hope they would change back, still nothing. 

 

Some have .###, other have .#, .## or other combination, so by default correcting .### gets tricky. Also, some are .#0...0#, other are #9...9#. I was hoping someone might know a solution for this problem. 

  • v-cherch-msft 

     

    Someone at the office found the answer for my problem. Apparently to highlight the Excel cell with format 'text' is not sufficient enough to set it as text. You first have to trim it. Then this green triangle appears in the corner. When you import that data, it will remove it. 

     

    Perhaps this will also solve similar issues for others. 

7 Replies