Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more
Hello Everyone,
I have a column ('ColumnA') containing a string in the format "AAA-word1, AAA-word2, BBB-word3", with varying numbers of words in each entry. My goal is to create a new column ('ColumnB') derived from 'ColumnA' that isolates and returns only the words starting with "AAA", or even just contains "AAA".
Like:
"AAA-word1, AAA-word2, BBB-word3" -> "AAA-word1, AAA-word2"
I'm limited to performing this operation within Power BI (using DAX) as I don't have direct access to modify the source data.
Any insights, suggestions, or sample DAX code would be greatly appreciated!
Cheers
Hi,
you could try creating a calculated column to get everything before the first '-' then use that column in a slicer
Additionally, if due to the data source you're not able to use a calculated column it would also work as a measure:
Hi @Anonymous,
You can use the CONTAINSSTRING function to achieve this.
https://learn.microsoft.com/en-us/dax/containsstring-function-dax
Your code can be something like this:
Column B = IF( CONTAINSSTRING([Column A], "AAA"), [Column A] )
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.
| User | Count |
|---|---|
| 84 | |
| 49 | |
| 37 | |
| 31 | |
| 30 |