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
Anonymous
Not applicable

Need Help

Hi All

I have a two text columns in the table, but i need to combine the two text columns make it as one.

 

Below are the examples

in the below table i have Name column and New Name Column. I need to combine the two columns and the condition is where ever New Name having the text it needs to be come othere wise Name has to come ,like  Result Column name in Below Image.

 

 Please find the Image for your refrence

Thanks!!

Nagaraju

 

 

 

Combine columns.png

 

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous ,

resulr column name =  coalesce([New column], [Column])

 

Assuming [New column]  is blank()

View solution in original post

v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

Create  a measure as below:

Result column name = 
IF(SEARCH(MAX('Table'[Name]),MAX('Table'[New Name]),1,0)=0,MAX('Table'[Name]),MAX('Table'[New Name]))

And you will see:

Annotation 2020-09-07 173047.png

For the related .pbix file,pls see attached.

 
 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

View solution in original post

5 REPLIES 5
v-kelly-msft
Community Support
Community Support

Hi @Anonymous ,

 

Create  a measure as below:

Result column name = 
IF(SEARCH(MAX('Table'[Name]),MAX('Table'[New Name]),1,0)=0,MAX('Table'[Name]),MAX('Table'[New Name]))

And you will see:

Annotation 2020-09-07 173047.png

For the related .pbix file,pls see attached.

 
 
Best Regards,
Kelly
Did I answer your question? Mark my post as a solution!

 

Hi Team,

How to impliment the same logic in power query

Thanks!!

Nagaraju

There @Nagraju ,

Create a new thread in power query forum,we will help to check it.

Best Regards,
Kelly

Did I answer your question? Mark my reply as a solution!

amitchandak
Super User
Super User

@Anonymous ,

resulr column name =  coalesce([New column], [Column])

 

Assuming [New column]  is blank()

ryan_mayu
Super User
Super User

@Anonymous 

please try to create a column.

Column = if(ISBLANK('Table'[NEWNAME]),'Table'[NAME],'Table'[NAME])

 1.PNG





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!




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.