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
PowerBO
Regular Visitor

Mass deleting columns, containing "value" if possible.

Hi there,

 

I have two workbooks that I need to merge, though each contains in excess of 400 columns. Perhaps fortunately, many of the redundant columns have a shared value/character in their heading. I'm hoping I can remove these columns quickly, based on said value. 

 

Does anyone know how to do that? 

 

Fingers crossed it's possible!

 

Thanks

1 ACCEPTED SOLUTION
AlienSx
Super User
Super User

hi, @PowerBO try 

Table.RemoveColumns(Source, List.Select(Table.ColumnNames(Source), each Text.Contains(_, shared_value)))

View solution in original post

3 REPLIES 3
AlienSx
Super User
Super User

hi, @PowerBO try 

Table.RemoveColumns(Source, List.Select(Table.ColumnNames(Source), each Text.Contains(_, shared_value)))

Forgive me Aliensx, you've been kind enough to provide an answer, and i'm not smart enough to know how to implement it. 

 

I've altered the underscore after Text.Contains to reflect the value I want, but seemingly the Source values I enter are incorrect, thus I only see an error sadly. 

@PowerBO leave underscore alone (I hope our friend "underscore" forgives you 😉 , replace shared_value with something meaningful like "remove_me_please"

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.

Top Kudoed Authors