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

Data Days is here! Join us now for 60+ days of learning, challenges, and connection. Learn more

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
Responsive Resident
Responsive Resident

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
Responsive Resident
Responsive Resident

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 is here Carousel

Fabric Data Days 2026

Don't miss out on Data Days, June 15 through August 7. Learn Fabric, Power BI, SQL, AI and more.

May Power BI Update Carousel

Power BI Monthly Update - May 2026

Check out the May 2026 Power BI update to learn about new features.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.