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
PowerDinosaur
Frequent Visitor

Finding and replacing words in sentences

Hi guys!

 

I have sentences (English and French) and I have specific words in a vocabluary.

I would like to highlight words in the english sentences when they are in the vocabluary and I would like to highlight the whole French sentence when there is a vocab match in the english one.

I want to do this with the help of an HTML visual.

I transformed my vocab column to look like this: <mark>word</mark> so If there is a match I would like to replace the specific word(s) in the sentences with the formatted words.

With the french sentences I might make a new formatted column and I would like to replace the whole value to the formatted one If there is a match. ( I guess finding the sentences with a match and giving it a prefix and a suffix would be less memory and computing consuming, but i'm not sure)

 

We made a solution for words, however we did It in M and we need to do it in DAX on the fly. (With Text.Replace)

 

Thank you in advance for your help!

 

Kind regards,

2 REPLIES 2
Anonymous
Not applicable

Hi @PowerDinosaur,

Can you please share a pbix or some dummy data that keep raw data structure with expected results? It should help us clarify your scenario and test to coding formula.

How to Get Your Question Answered Quickly  

Regards,

Xiaoxin Sheng

tamerj1
Super User
Super User

Hi @PowerDinosaur 

I can help you with DAX but not with M

If ok with you please present some examples along the expected results. Thank you

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.