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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

Get values with delimiter in DAX

Hi,

 

Can I get only number in the middle after delimiter "-" and before delimiter "/"? 

 e.g.  Result should be 113960

 

Hope the solution will not be with Left or Mid fucntion since there will be changes on number of text. 

 

 

jeongkim_0-1750834324138.png

 

1 ACCEPTED SOLUTION
freginier
Super User
Super User

Hi, 

 

You can extract the number using PATHITEM with SUBSTITUTE, which avoids using LEFT or MID:

 

 

PATHITEM(SUBSTITUTE(SUBSTITUTE('Table'[INVUNIT], "-", "|"), "/", "|"),3)

 

 

Replace "-" and "/" with a common delimiter like "|"

Then use PATHITEM(..., 3) to get the 3rd element (i.e. the number after - and before /)

This is dynamic and doesn’t depend on string length.

 

freginier

View solution in original post

2 REPLIES 2
freginier
Super User
Super User

Hi, 

 

You can extract the number using PATHITEM with SUBSTITUTE, which avoids using LEFT or MID:

 

 

PATHITEM(SUBSTITUTE(SUBSTITUTE('Table'[INVUNIT], "-", "|"), "/", "|"),3)

 

 

Replace "-" and "/" with a common delimiter like "|"

Then use PATHITEM(..., 3) to get the 3rd element (i.e. the number after - and before /)

This is dynamic and doesn’t depend on string length.

 

freginier

Anonymous
Not applicable

Hi,

 

What about getting value before first delimiter / ?

 

jeongkim_0-1750905423638.png

 

Result will be:

PLMN-PLMN/MRBTS-113960

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 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