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

We've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now

Reply
Anonymous
Not applicable

Extract #hashtags from the data in a column to a new column in the same table

Hello community,

 

I am working on a social media project where I have to filter all the posts based on the hashtags. I have a column which shows me the posts and the hashtags used all together in one column as shown below

 

I would like to scrape the hashtags and put them all in a new column and later use that column as filter for the report.

 

jpatel_0-1648509089663.png

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @Anonymous ,

 

You can use replace value in the first step. For example.

vcgaomsft_1-1648781122079.png

Replace value.

vcgaomsft_0-1648781043087.png

Value to find: #+space, Replace with: #

vcgaomsft_2-1648781211785.png

vcgaomsft_3-1648781327264.png

Split Column by Delimiter.

vcgaomsft_4-1648781464406.png

vcgaomsft_5-1648781515250.png

Remove unwanted columns.

vcgaomsft_6-1648781570539.png

Close and apply.

Attach the PBIX file for reference. Hope it helps.

 

Best Regards,
Community Support Team_Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems with it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

View solution in original post

4 REPLIES 4
mahoneypat
Microsoft Employee
Microsoft Employee

You could use an expression like this in a custom column to return the hashtags as a list (after which you can expand those to new rows, concatenate them back together, etc.).

 

= List.Select(Text.Split([TextColumn]), " "), each Text.Start(_,1) = "#")

 

Pat

 





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Hi @mahoneypat , where should we put the formula? I tried to add as custom column, but does not work. What did I do wrong? Thank you. 

Anonymous
Not applicable

What if I have data like - # Logo Design so basically there is a space between # and Logo. How do I split in that case?

Anonymous
Not applicable

Hi @Anonymous ,

 

You can use replace value in the first step. For example.

vcgaomsft_1-1648781122079.png

Replace value.

vcgaomsft_0-1648781043087.png

Value to find: #+space, Replace with: #

vcgaomsft_2-1648781211785.png

vcgaomsft_3-1648781327264.png

Split Column by Delimiter.

vcgaomsft_4-1648781464406.png

vcgaomsft_5-1648781515250.png

Remove unwanted columns.

vcgaomsft_6-1648781570539.png

Close and apply.

Attach the PBIX file for reference. Hope it helps.

 

Best Regards,
Community Support Team_Gao

 

If there is any post helps, then please consider Accept it as the solution to help the other members find it more quickly. If I misunderstand your needs or you still have problems with it, please feel free to let us know. Thanks a lot!

How to get your questions answered quickly -- How to provide sample data

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

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.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

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