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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
olliehernandez
New Member

Combining Columns

Hi everyone!

 

I'd like to combine three columns together.  When 'Park Name' is blank, I want it to add data from either community center & pool or community garden.  When Park Name is blank then use community center & pool.  And the next column to have the already conditioned column, to then include community garden.  When I add the conditional column, it's not combining the community center & pool or community garden column, it's only showing data from the park name column.  I'm not sure what I'm doing wrong.  Any help is greatly appreciated!  Thank you!

I'd like to combine these three columns into one, so I have all of the locations in one column.I'd like to combine these three columns into one, so I have all of the locations in one column.

Columns.PNG

= Table.AddColumn(#"Renamed Columns", "Combined Locations", each if [Park Name] = """""" then [#"Community Center & Pool"] else [Park Name])

condition.PNG

= Table.AddColumn(#"Added Conditional Column", "All Combined", each if [Combined Locations] = """""" then [Community Garden] else [Park Name])

 

When I've added that the only thing I'm coming back with are the park names in the columns, it's not adding the community centers or the community gardens into the new column.  Thank you!

1 ACCEPTED SOLUTION
Chewdata
Super User
Super User

Hey, 

In your code you have [Park Name] = """""" for a value, so it looks for """" in the string. 

Try: 
= Table.AddColumn(#"Renamed Columns", "Combined Locations", each if [Park Name] = "" then [#"Community Center & Pool"] else [Park Name])

View solution in original post

5 REPLIES 5
Chewdata
Super User
Super User

Hey, 

In your code you have [Park Name] = """""" for a value, so it looks for """" in the string. 

Try: 
= Table.AddColumn(#"Renamed Columns", "Combined Locations", each if [Park Name] = "" then [#"Community Center & Pool"] else [Park Name])

That's what it was!  Thank you!!

olliehernandez
New Member

Thanks for your reply.  It's still not pulling the names into the new column using null.  Is there something else that needs to be added?

Any chance you can post that sample data as text?



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Greg_Deckler
Community Champion
Community Champion

@olliehernandez Try using null instead of ""



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

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.