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
PJOS_1
Frequent Visitor

Prevent Power BI from changing imported data

Greetings all, I've scoured the web trying to see if someone has had a similar problem and I haven't found anything. My problem is actually really simple. I have a table in Excel that I import into in Power BI. I don't do any manipluations to it, I just need it exactly in its current form. All is well in the import except for one column. The problem column in the Excel table has several numbers that are formated at text. See below:

 

  Sample value in Excel. These numbers are formated as text.

PJOS_1_0-1617974674614.png

 

These are the exact same items that were imported into Power BI. Despite the fact I turned off type detection.

PJOS_1_1-1617975340956.png

 

Type detection is turned off:

PJOS_1_2-1617976386043.png

Is there any way to prevent this? Those numbers are in a column that is used as a primary key. I really need them exactly the way Excel has them. 

 

1 ACCEPTED SOLUTION

In my experience with this problem, I found that having it on or off didn't matter. What solved the problem for me though was to simply run TRIM() on all the values. Problem solved.

View solution in original post

4 REPLIES 4
PJOS_1
Frequent Visitor

It turns out that Excel apparently is willing to lie to you. I've formated those cells as text yet if I run a simple "ISTEXT" function, several of them come back "FALSE". What a headache.....

Hi @PJOS_1 

How about turning on the Type Detection option for this file? Based on my test, if I check Type Detection, the data shows well in Power BI. However, when I uncheck Type Detection, the result is the same as yours. It seems Type Detection feature can help solve this problem. 

041303.jpg

Regards,
Community Support Team _ Jing
If this post helps, please Accept it as the solution to help other members find it.

In my experience with this problem, I found that having it on or off didn't matter. What solved the problem for me though was to simply run TRIM() on all the values. Problem solved.

amitchandak
Super User
Super User

@PJOS_1 , Power bi will not take excel formatting, convert to number, and change decimal place and check , it might be the same number

or

In power bi reduce decimal place

or

Open power query, Right click and open the Advance editor and find the column, and change datatype to text

refer: https://www.youtube.com/watch?v=h0yLtceT0i4

 

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.