The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredCompete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.
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.
Solved! Go to Solution.
Hi @Anonymous ,
You can use replace value in the first step. For example.
Replace value.
Value to find: #+space, Replace with: #
Split Column by Delimiter.
Remove unwanted columns.
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
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
To learn more about Power BI, follow me on Twitter or subscribe 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.
What if I have data like - # Logo Design so basically there is a space between # and Logo. How do I split in that case?
Hi @Anonymous ,
You can use replace value in the first step. For example.
Replace value.
Value to find: #+space, Replace with: #
Split Column by Delimiter.
Remove unwanted columns.
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