- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

how to force integers into text (they are codes)
I have some data from excel. There is a column which are codes, most of them just numeric but come are alphanumeric.
When in excel I see the message “the number in this cell is formatted as text or preceded by an apostrophe”
When I open it in powerbi, I consume the file…. I go to “transform data” (instead of load).
Then I go to the said column and when I want to change the datatype to text, I get:
(I have tried both options, and with both options I end up with “errors”).
What is the correct way for forcing even a column that is just numbers into text? ( they are codes, so no intention of using them as numbers)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

Hi@ovonel,
I notice that there is the message “the number in this cell is formatted as text or preceded by an apostrophe” in excel before you connect to Power BI Desktop.
You can handle this problem first , then try it again in Power BI Desktop.
Here's the workround :You cannot convert text to number when the cell contains a number
Hope it helps.
Best Regards,
Caitlyn Yan
If this post helps then please consider Accept it as the solution to help the other members find it more quickly.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content

You are getting this message because Power Query "automatically" assigns a field type when the query is loaded. Check in the query steps, locate the first "Changed Type" step and edit the rogue column to tye text
Did I answer your question? Mark my post as a solution!
In doing so, you are also helping me. Thank you!
Proud to be a Super User!
Paul on Linkedin.

Helpful resources
Subject | Author | Posted | |
---|---|---|---|
Anonymous
| 07-09-2024 11:41 PM | ||
08-26-2024 09:31 AM | |||
10-22-2024 02:44 AM | |||
01-10-2024 02:44 AM | |||
01-06-2025 01:08 AM |
User | Count |
---|---|
140 | |
110 | |
81 | |
60 | |
46 |