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

Join the FabCon + SQLCon recap series. Up next: Power BI, Real-Time Intelligence, IQ and AI, and Data Factory take center stage. All sessions are available on-demand after the live show. Register now

Reply
reno1
Frequent Visitor

Parse Existing Column in DirectQuery mode

Hi,

I'm working with a table that, in one column, contains different strings of text that I need to extract data from. Some of these strings include:

  • "Matched with confidence: 100%"
  • "Connection Error 566-353-54354 - User busy"
  • "Matched with confidence: 100%. Variables: Step1Choice1=Hello"
  • "No match. Confidence: 59% is less than the required 80%"

NOTE: The bold underlined number is what I need.

 

Basically, if a number is proceeded by "onfidence: " and followed by "%" I need to add it to its own column. I found a couple of ways to achieve this, but the result was I could no longer use a live connection with DirectQuery. As my database is beyond massive, import mode is not an option. Also due to circumstances, I am unable to parse in the database before connecting to Power BI. 

 

So, is there a way I can parse the required data from the column while staying in DirectQuery mode (possibly using a DAX query)? Or am I out of luck?

1 ACCEPTED SOLUTION
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @reno1

 

Are you able to add calcualted columns to your tables?  If so this might be close

 

Parsed Column = 
var myStart = FIND("onfidence:",'Table3'[Text],,0)
var myLength= FIND("%",Table3[Text],myStart + 11,0) - (myStart + 11)
var myResult = IF(myStart>0,MID('Table3'[Text],myStart + 11,myLength),Blank())
RETURN int(myResult) 

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

View solution in original post

2 REPLIES 2
Phil_Seamark
Microsoft Employee
Microsoft Employee

Hi @reno1

 

Are you able to add calcualted columns to your tables?  If so this might be close

 

Parsed Column = 
var myStart = FIND("onfidence:",'Table3'[Text],,0)
var myLength= FIND("%",Table3[Text],myStart + 11,0) - (myStart + 11)
var myResult = IF(myStart>0,MID('Table3'[Text],myStart + 11,myLength),Blank())
RETURN int(myResult) 

To learn more about DAX visit : aka.ms/practicalDAX

Proud to be a Datanaut!

@Phil_Seamark, this works perfectly! Thank you

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

FabCon and SQLCon Highlights Carousel

FabCon &SQLCon Highlights

Experience the highlights from FabCon & SQLCon, available live and on-demand starting April 14th.