cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
dvhez Regular Visitor
Regular Visitor

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

Accepted Solutions
Super User
Super User

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

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



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

Proud to be a Datanaut!




Super User
Super User

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

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



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

Proud to be a Datanaut!




3 REPLIES 3
Super User
Super User

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

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



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

Proud to be a Datanaut!




dvhez Regular Visitor
Regular Visitor

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

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

Super User
Super User

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

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



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

Proud to be a Datanaut!




Helpful resources

Announcements
Virtual Launch Event

Microsoft Business Applications October Virtual Launch Event

Join us for an in-depth look at the new innovations across Dynamics 365 and the Microsoft Power Platform.

Power BI Helps Homeless and Trouble Youth

Power BI Helps Homeless and Trouble Youth

We spoke with Power BI Super User, Greg Deckler, about his charity work

MBAS Gallery

Watch Sessions On Demand!

Continue your learning in our online communities.

Top Kudoed Authors
Users Online
Currently online: 424 members 5,010 guests
Please welcome our newest community members: