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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Question on Replace Function

Hi,

 

I add a new column by copying an existing one and changing the format from numbers to text (copied year column and division new one) then add my text as shown so that i can create a relationship with another sheet.

 

I'm wondering if I refresh the original source data and new rows are introduced...will power bi automatically add the text that i entered in the new column.

 

//NT

 

tksnota_0-1720079291357.png

 

1 ACCEPTED SOLUTION

@Anonymous Put comma inside a double quotation and use & like below:

Date.ToText([Invoice Date]) & " , " & [Comments]

Hope this answered your question. If, please mark it as a solution!!



View solution in original post

14 REPLIES 14
Anonymous
Not applicable

my requirement is establish a relation with another sheet so by adding a new column without using custom just by copying any existing one and changing the field from number to text

 

the above requirement is satisfied. but my question since i haven't used custom column only copy an existing one and made the changes...will the new column automatically introduced the changes i maded in this case a text after a refresh and numerous rows are created

 

hope i make myself clear

Select the column you want to copy.
Right-click on the column header and select Duplicate Column. This will create a new column with the same values as the original.

Select OrderID_Text.
Go to the Transform tab.
Click on Data Type and select Text

 

When steps are recorded in Query editor than new data will also be updated you can follow this method




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Anonymous
Not applicable

thanks. I had done this exercise already...

bhanu_gautam
Super User
Super User

Can you explain what is your exact requirement as compared to your original column

 




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Anonymous
Not applicable

Hi,

 

 

 Will the column add the text when new rows are introduced after refresh because I got conflicting answer?

 

I attempted to use Custom Column but I don't know how to do it. Can someone share me the syntax i need to use?

@Anonymous Please find the image below to create custom column. If your column is integer data type, then you need to convert it to text first to add custom text, otherwise it will throw error.

Number.ToText() function helps to convert numbert to text and '&' is used as concat text.

shafiz_p_0-1720084887539.png

 

If this solves your problem, mark it as solution.

Anonymous
Not applicable

Hi,

 

Your code is great. Is it possible to capture the Text without the year as shown?

 

//NT

 

tksnota_0-1720085639844.png

tksnota_1-1720085655656.png

 

 

@Anonymous Based on my understanding, you’d like to concatenate the ‘Division’ column with the ‘Year’ column and change the data type to text.

 

To achieve this, simply replace the hardcoded value ‘IND’ with the actual column name ‘[Division]’ and update the data type accordingly.”

 

Feel free to ask if you need further clarification or assistance!

 

If this answered your question, please mark it as solution!!

Anonymous
Not applicable

Thanks. Is it possible to do the following

 

1. concatenate Division with Invoice amount (Relationship 01)

1. concatenate Invoice Date  with comments (Relationship 02)

@Anonymous Yes it is possible.

 

1. Division with invoice amount - [Division] & Number.ToText([Invoice amount])
2. Invoice Date with comments - Date.ToText([Invoice Date]) & [Comments]

Hope this answered you question. If, please mark it as a solution!!

Anonymous
Not applicable

this is great...how can i add comma to distinguish between the 2 data

@Anonymous Put comma inside a double quotation and use & like below:

Date.ToText([Invoice Date]) & " , " & [Comments]

Hope this answered your question. If, please mark it as a solution!!



shafiz_p
Super User
Super User

@Anonymous As I can understand, that you want to create a key column to develop relationship with other tables. Yes, If you create a column based on other columns, as you mentioned, and add specific text, after refresh, the new column will automatically update whenever new data is added to the source file.

If this answered you question, please mark it as solution.

bhanu_gautam
Super User
Super User

@Anonymous , In Power BI, when you create a new column by copying an existing one and then manually add text to it, the new column will not automatically update with the text you entered if new rows are introduced upon refreshing the original source data. This is because the manual text entries are not part of the data transformation logic and are not dynamically applied to new data.

 

To handle this you can use Custom column and try to all modifications on the basis of that




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.