Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.
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.
Solved! Go to Solution.
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 )
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.
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 )
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.