cancel
Showing results for 
Search instead for 
Did you mean: 

Fabric is Generally Available. Browse Fabric Presentations. Work towards your Fabric certification with the Cloud Skills Challenge.

Reply
ronaldbalza2023
Continued Contributor
Continued Contributor

Extract text inside quotes

Hello everyone, I am trying to figure out how to extract the text that is enclosed within certain characters. Specifically, I would like to extract the name. Thank you for your help.

 
<span class="63f561bef77505002913b22d">John Doe</span>
1 ACCEPTED SOLUTION
Ahmedx
Super User
Super User

2 REPLIES 2
Ahmedx
Super User
Super User

vicky_
Super User
Super User

In Power Query, you can go to Transform > Extract > Text Between Delimiters. 
If you need to do it in DAX, then try:

 

Text Between Quotes = 
var startIndex = SEARCH(">", [columnName]) // find the index of the first > character
var remainingText = LEFT([columnName], LEN([columnName]) - startIndex)
var endIndex = SEARCH("<", [columnName]) // find the index of the next quote character (starting from the startIndex)
return LEFT(remainingText, endIndex)

 

(I haven't tested the code, so you will need to do some tweaking. Hopefully you get the idea)

Helpful resources

Announcements
PBI November 2023 Update Carousel

Power BI Monthly Update - November 2023

Check out the November 2023 Power BI update to learn about new features.

Community News

Fabric Community News unified experience

Read the latest Fabric Community announcements, including updates on Power BI, Synapse, Data Factory and Data Activator.

Power BI Fabric Summit Carousel

The largest Power BI and Fabric virtual conference

130+ sessions, 130+ speakers, Product managers, MVPs, and experts. All about Power BI and Fabric. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors