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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
nagaraj007
Post Patron
Post Patron

Need to find and replace bulk words from one column

Hello All,

 

I am struck with a problem wherein i have a COMPANY COLUMN wherein there are old and new names, i need to replace old name with new name and to keep others as it is. Please advice how to go about this. I searched a lot in Forums but i am really sorry i didnt get the idea. Please find the attached list.bulk.png

1 ACCEPTED SOLUTION

Thank you very much for your help. 

View solution in original post

3 REPLIES 3
v-lid-msft
Community Support
Community Support

Hi @nagaraj007 ,

 

We can create a calculated column using following formula to meet your requirement:

 

 

ReplaceWith = 
VAR companyName = [Company Name]
VAR length =
    LEN ( companyName )
VAR t =
    FILTER (
        'Table',
        LEN ( [Company Name] ) > length
            && LEFT ( 'Table'[Company Name], length ) = companyName
    )
RETURN
    IF ( COUNTROWS ( t ) > 1, MAXX ( t, [Company Name] ), companyName )

 

6.PNG

 


BTW, pbix as attached.

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you very much for your help. 

Hi @nagaraj007 ,

 

Sorry for my mistake, we should use the >=1 in formula.

 

ReplaceWith = 
VAR companyName = [Company Name]
VAR length =
    LEN ( companyName )
VAR t =
    FILTER (
        'Table',
        LEN ( [Company Name] ) > length
            && LEFT ( 'Table'[Company Name], length ) = companyName
    )
RETURN
     IF ( COUNTROWS ( t ) >= 1, MAXX ( t, [Company Name] ), companyName )

3.PNG

 

Best regards,

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Community Support Team _ Dong Li
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors