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
Djw
New Member

Merging 2 columns while keeping some values from each of the columns.

Hi guys, thank you for taking the time to read this and helping out.

I'm having some trouble with merging the two columns together.

The attached image is of the columns in question, "gdp" and "2014 GDP, IMF.GDP"

Capture.PNG

I would like to merge the 2 columns together, keeping the the existing "gdp" value except for the 0 values, replacing the 0 values with the corresponding "2014 GDP, IMF.GDP" value.

May I know how would I go about doing that?

 

Thank you in advance!

2 ACCEPTED SOLUTIONS
HotChilli
Super User
Super User

You could add a custom column , something like

if [gdp] > 0 then [gdp] else [2014 gdp.........]

View solution in original post

Mariusz
Community Champion
Community Champion

Hi @Djw 

You can just add a conditonal column:
1. In Add column Tab find Coditional Column and follow the steps below.
replace Start date = "gdp" and End Date = "2014 GDP, IMF.GDP"

 

image.png

2. Remove , "gdp" and "2014 GDP, IMF.GDP" column 

 

Regards,
Mariusz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
Mariusz
Community Champion
Community Champion

Hi @Djw 

You can just add a conditonal column:
1. In Add column Tab find Coditional Column and follow the steps below.
replace Start date = "gdp" and End Date = "2014 GDP, IMF.GDP"

 

image.png

2. Remove , "gdp" and "2014 GDP, IMF.GDP" column 

 

Regards,
Mariusz

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi Mariusz,

 

Thank you so much for your help, I hope you have a nice day ahead!

 

Warmest regards,

Djw

HotChilli
Super User
Super User

You could add a custom column , something like

if [gdp] > 0 then [gdp] else [2014 gdp.........]

Hi HotChilli, Thank you so much for your help, I hope you have a nice day ahead! Warmest regards, Djw

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.