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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
Prabhu11
Frequent Visitor

Create new column having the values of existing 2 columns

Hi Community,

 

I want to create a column with the values of Column 1 and Column 2 as column 3,

How can I achieve this, kindly help

 

Column 1Column 2 Column 3
A0A
B0B
0CC
000
0DD

 

Regards

Prabhu

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Oh okay, my bad!
here is a solution to that:

Outcome = SWITCH(TRUE(),
'Table (2)'[Column1] = "0" && 'Table (2)'[Column2]="0", 'Table (2)'[Column1],
'Table (2)'[Column1]="0" && 'Table (2)'[Column2] <>"0", 'Table (2)'[Column2],
'Table (2)'[Column1] <> "0" && 'Table (2)'[Column2] ="0", 'Table (2)'[Column1])



View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi,
By combining, do you mean concatinating?
Then you can use: 

Combined = 'Table'[Column 1] & " " & 'Table'[Column 2] & " " & 'Table'[Column 3]

Hi, I don't need to concatenate, I trying to achieve through the condition

 

i.e If Column 2 has value then return the value of Column 2 else return the value of Column 1 in the final Column 3

Anonymous
Not applicable

Oh okay, my bad!
here is a solution to that:

Outcome = SWITCH(TRUE(),
'Table (2)'[Column1] = "0" && 'Table (2)'[Column2]="0", 'Table (2)'[Column1],
'Table (2)'[Column1]="0" && 'Table (2)'[Column2] <>"0", 'Table (2)'[Column2],
'Table (2)'[Column1] <> "0" && 'Table (2)'[Column2] ="0", 'Table (2)'[Column1])



Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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