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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dvhez
Helper II
Helper II

DAX: How to split by delimiter, modify one value and then re-merge?

My data looks like the image below. I want, for example to convert "P.AZUCAR________220" into "P.AZUCAR 220 kV". Ideally to "P. Azucar 220 kV" (space after dot) but the first one will definetly be great.

PBIDesktop_2018-10-20_16-56-59.png

 

 

 

2 ACCEPTED SOLUTIONS
MFelix
Super User
Super User

Hi @dvhez,

 

on the query editor select the column right click then replace values replace the _ by nothing and redo the replace and do the 220 by " 220 kV"

 

this should give the expected result.

 

No need to split columns.

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

Hi @dvhez,

 

Although your data is always 220 on the end of the column here is a formula to add the last 3 digits and kV to beginnin.

 

Column = LEFT(Table[Column];FIND("_";Table[Column];1)-1) & " " & RIGHT(Table[Column];3)& " kV" 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

3 REPLIES 3
MFelix
Super User
Super User

Hi @dvhez,

 

on the query editor select the column right click then replace values replace the _ by nothing and redo the replace and do the 220 by " 220 kV"

 

this should give the expected result.

 

No need to split columns.

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



I'm trying to do this in DAX though :(. My data has almost 60 million rows and it takes 1 hour aprox to apply changes to that specific query.

Hi @dvhez,

 

Although your data is always 220 on the end of the column here is a formula to add the last 3 digits and kV to beginnin.

 

Column = LEFT(Table[Column];FIND("_";Table[Column];1)-1) & " " & RIGHT(Table[Column];3)& " kV" 

Regards,

MFelix


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.