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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
ToddMate
Helper II
Helper II

Delimiter in second column - Same table

Hi All,

I need help, in short, I have 2 columns,Queue and Reason within my Sales table. There are multiple values in each column seperated by the ; delimiter.

I am wanting to return the value that is in the same position in both the Queue and Reason columns where the search value is "Sales".
For example, i want to return the first delimited value in the Reason column where "Sales" is the first value from the Queue column.

See examples below. Appreciate any assistance. 

ToddMate_0-1708309912714.png

Cheers Todd

 

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ToddMate ,

 

According to your description, here are my steps you can follow as a solution.

(1) We can create a calculated column.

Result = 
VAR _a1 = SUBSTITUTE( SUBSTITUTE(('Table'[Queue])," ",""),";","|")
var _a2=
MINX (
    FILTER (
        GENERATESERIES ( 1, PATHLENGTH ( _a1 ), 1 ),  
        PATHITEM ( _a1, [Value], TEXT ) = "Sales"  
    ),
    [Value]
)
var _a3= SUBSTITUTE( SUBSTITUTE(('Table'[Reason])," ",""),";","|")
RETURN  PATHITEM ( _a3, _a2, INTEGER )

(2) Then the result is as follows.

vtangjiemsft_0-1708396410777.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @ToddMate ,

 

According to your description, here are my steps you can follow as a solution.

(1) We can create a calculated column.

Result = 
VAR _a1 = SUBSTITUTE( SUBSTITUTE(('Table'[Queue])," ",""),";","|")
var _a2=
MINX (
    FILTER (
        GENERATESERIES ( 1, PATHLENGTH ( _a1 ), 1 ),  
        PATHITEM ( _a1, [Value], TEXT ) = "Sales"  
    ),
    [Value]
)
var _a3= SUBSTITUTE( SUBSTITUTE(('Table'[Reason])," ",""),";","|")
RETURN  PATHITEM ( _a3, _a2, INTEGER )

(2) Then the result is as follows.

vtangjiemsft_0-1708396410777.png

Best Regards,

Neeko Tang

If this post  helps, then please consider Accept it as the solution  to help the other members find it more quickly. 

Ashish_Mathur
Super User
Super User

Hi,

Another approach could be that of Power Query.  Therein, we can create one row for each item and then filter on Sales.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Ahmedx
Super User
Super User

pls try this

Screenshot_1.png

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors