cancel
Showing results for 
Search instead for 
Did you mean: 
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
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

BizApps LATAM 2023

Business Application LATAM Summit 2023

Join the biggest FREE Business Applications Event in LATAM this February.

Power Platform Bootcamp

Global Power Platform Bootcamp

In this bootcamp we will deep-dive into Microsoft’s Power Platform stack with hands-on sessions and labs, delivered to you by experts and community leaders.