Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by watching the DP-600 session on-demand now through April 28th.
Learn moreJoin 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
Hi,
I'm trying to get name in a long string.
The string is like
"operation = 'accept', name = 'Lucy'; operation = 'cancel', name = 'Tina'; operation = 'end', name = 'Tim'"
I only want the name of person who does the cancel operation which is Tina.
Can anybody help? How can I achieve this by adding a calculated column?
Solved! Go to Solution.
Hi @Anonymous
try a DAX calculated column
Column =
var _start = SEARCH("cancel", 'Table'[LongStringColumn]) + 17
var _end = SEARCH("operation", 'Table'[LongStringColumn], _start) - 3
RETURN
MID('Table'[LongStringColumn], _start, _end - _start)
@Anonymous
Column =
VAR a = SUBSTITUTE(SUBSTITUTE('Table'[column1],"'","/",7),"'","/",7)
VAR loca=find("/",a,1,0)
VAR locb =find("/",a,loca+1,0)
return mid(a,loca+1,locb-loca-1)
Proud to be a Super User!
In the query editor, add a Custom Column with this formula
Text.BetweenDelimiters([ColumnWithText], "'cancel', name = '", "'")
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
In the query editor, add a Custom Column with this formula
Text.BetweenDelimiters([ColumnWithText], "'cancel', name = '", "'")
If this works for you, please mark it as the solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
@Anonymous
Column =
VAR a = SUBSTITUTE(SUBSTITUTE('Table'[column1],"'","/",7),"'","/",7)
VAR loca=find("/",a,1,0)
VAR locb =find("/",a,loca+1,0)
return mid(a,loca+1,locb-loca-1)
Proud to be a Super User!
Hi @Anonymous
try a DAX calculated column
Column =
var _start = SEARCH("cancel", 'Table'[LongStringColumn]) + 17
var _end = SEARCH("operation", 'Table'[LongStringColumn], _start) - 3
RETURN
MID('Table'[LongStringColumn], _start, _end - _start)
Hi,
Try using the "Column from Examples" featue in the Query Editor.
Check out the April 2026 Power BI update to learn about new features.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
| User | Count |
|---|---|
| 48 | |
| 40 | |
| 38 | |
| 20 | |
| 17 |
| User | Count |
|---|---|
| 68 | |
| 65 | |
| 30 | |
| 26 | |
| 25 |