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
bolabuga
Helper V
Helper V

[ Help extracting part of a text from a column ]

Hello everyone.

I would like help extracting the houses adresses from a "address column", and i need just the text at the start till the "," character.

 

Ex:

Travessa john charles de mello, 457 A - neighborhood ABC - City xyz, Sao paulo---> I need the part of the text till the first "comma", which is "Travessa john charles de mello".

 

I never had the need to do such a thing in power bi, and im somewhat lost here, because theres a lot of different adresses and i would like to know if theres a way to use the FIRST COMMA as a POINT where we can count the characters till there and then maybe use that count in a LEFT dax function.

 

Any help is welcome, it can be dax or power query.

2 ACCEPTED SOLUTIONS
AlB
Super User
Super User

Hi @bolabuga 

Sure, you can use FIND:

     FIND(",", Table1[Col],1,0) 

to get the position of the first comma and then use that (-1) with  a LEFT( )

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

 

View solution in original post

CNENFRNL
Community Champion
Community Champion

Hi, @bolabuga , Power BI toolkit consists of another powerful lightsaber, Power Query, which does the trick.

Untitled.png

2.png

It's power is beyond imagination when you have a firm grasp of functions in M language. I bet you'll love it.

 


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

View solution in original post

3 REPLIES 3
CNENFRNL
Community Champion
Community Champion

Hi, @bolabuga , Power BI toolkit consists of another powerful lightsaber, Power Query, which does the trick.

Untitled.png

2.png

It's power is beyond imagination when you have a firm grasp of functions in M language. I bet you'll love it.

 


Thanks to the great efforts by MS engineers to simplify syntax of DAX! Most beginners are SUCCESSFULLY MISLED to think that they could easily master DAX; but it turns out that the intricacy of the most frequently used RANKX() is still way beyond their comprehension!

DAX is simple, but NOT EASY!

@AlB 

@CNENFRNL 

 

Wow you both were amazing...REEEAALLY thks!!!

 

 

AlB
Super User
Super User

Hi @bolabuga 

Sure, you can use FIND:

     FIND(",", Table1[Col],1,0) 

to get the position of the first comma and then use that (-1) with  a LEFT( )

 

Please mark the question solved when done and consider giving kudos if posts are helpful.

Contact me privately for support with any larger-scale BI needs, tutoring, etc.

Cheers 

 

SU18_powerbi_badge

 

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.