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
Anonymous
Not applicable

Filter a List by Character - List of Columns

Hi,

 

I'm creating a list of all Columns in my query. I would like to filter this list to only show Columns that contain a particular character in the Column Header name.

 

I've able to get a list of all Columns using the following:

 

= Table.ColumnNames(#"Trim Text and Join to Last Split Step")

 

I want to filter my list to only show fields that contain ".". In the following step, I'm able to filter the list to only show fields with an extact match:

 

= List.Select(Table.ColumnNames(#"Trim Text and Join to Last Split Step"), each _ = "Campaign.Campaign")

 

But I want to be able to use Contains somewhere here to I can return more fields.

 

Any ideas on how I can achieve this in one step?

 

Thanks,

Mark

1 ACCEPTED SOLUTION
v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

You can use this

= List.Select(Table.ColumnNames(#"previous step name"), each Text.Contains(_, "."))

vjingzhang_0-1674634827237.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

View solution in original post

2 REPLIES 2
Anonymous
Not applicable

Hi @v-jingzhang ,

 

That works perfectly, thanks.

 

Mark

v-jingzhang
Community Support
Community Support

Hi @Anonymous 

 

You can use this

= List.Select(Table.ColumnNames(#"previous step name"), each Text.Contains(_, "."))

vjingzhang_0-1674634827237.png

 

Best Regards,
Community Support Team _ Jing
If this post helps, please Accept it as Solution to help other members find it.

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors