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
ThoSch
Regular Visitor

cut Text with LEFT and FIND

Hi,

 

i need to cut die the domain from an e-mail columns, i tryed the command:

 

Domain1 = LEFT(Tabelle1[Column1];FIND("@";Tabelle1[Column1]-1))

 

 

 

2016-10-05 13_43_05-PowerBiDemo01 – Power BI Desktop.png2016-10-05 13_43_29-PowerBiDemo01 – Power BI Desktop.png

 

And iam wondering that i have two diffrent Error Codes.

 

How can i fixed this?

 

Thanks

2 ACCEPTED SOLUTIONS

Hi,

 

You can do this so much easier via the Query Editor and use the split column transformation and split by @

 

 

 

capture20161005135613430.png

 

BR

Erik

View solution in original post

PavelR
Solution Specialist
Solution Specialist

@ThoSch then you can use the last parameter of FIND function - NotFoundValue and set it to 1. If you want blank, when there is no @ in email. If you want the text, then insert IF function as well.

 

Regars.

Pavel

View solution in original post

5 REPLIES 5

Hi,

 

You can do this so much easier via the Query Editor and use the split column transformation and split by @

 

 

 

capture20161005135613430.png

 

BR

Erik

Thanks, the solution is working fine for me.

PavelR
Solution Specialist
Solution Specialist

Hi @ThoSch. Subtracting by 1 should be after FIND function. DAX should be as:

 

Domain1 = LEFT(Tabelle1[Column1];FIND("@";Tabelle1[Column1])-1)

Regards.

Pavel 

thanks, that solved one problem, but if there is empty field, i have the other error.

 

2016-10-05 13_58_30-PowerBiDemo01 – Power BI Desktop.png

PavelR
Solution Specialist
Solution Specialist

@ThoSch then you can use the last parameter of FIND function - NotFoundValue and set it to 1. If you want blank, when there is no @ in email. If you want the text, then insert IF function as well.

 

Regars.

Pavel

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.