Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

Power Query text and number format

Hi, 

 

It maybe a simple solution but I am struggling to get my column in Power Query (PowerBI) to accept a number and text format. 

 

Could you please advise on how I can keep both number and text format in my column without an error? 

 

Thank you!

Aziza_0-1648041004959.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

You have to find a step where the function "Table.TransformColumnTypes" is used for that specific column "Proc. Type" for the first time. If in one of the previous steps the type was changed to number, trying to change data type to text later on will not "recover" the data. In the screenshot we cannot see what previous steps were applied so we can just guess why it does not work for you.

View solution in original post

5 REPLIES 5
Anonymous
Not applicable

Thanks all! It did work 

jennratten
Super User
Super User

You will have to format the number as text in order to keep both in the same column.

If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.

Proud to be a Microsoft Fabric Super User

Anonymous
Not applicable

Thank you, I tried that initially but it still keeps the text as an error 

You can do something like the script below.  If this does not work for you please post the script that you are using to create the column and then we can help modify it so that it works.  

Table.AddColumn(#"Prev Step", "Custom", each if Value.Is(Value.Type([Column1]), type number) then Number.ToText([Column1]) else [Column1], type text)

 

If this post helps to answer your questions, please consider marking it as a solution so others can find it more quickly when faced with a similar challenge.

Proud to be a Microsoft Fabric Super User

Anonymous
Not applicable

You have to find a step where the function "Table.TransformColumnTypes" is used for that specific column "Proc. Type" for the first time. If in one of the previous steps the type was changed to number, trying to change data type to text later on will not "recover" the data. In the screenshot we cannot see what previous steps were applied so we can just guess why it does not work for you.

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.