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

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

Reply
jeongkim
Post Prodigy
Post Prodigy

Get value before second delimiter in DAX

Hi,

 

How can we get value up to before second delimiter / in DAX creating new column? 

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

Since it is dynamic and shouldn't depend on string length. 

 

jeongkim_0-1750905642522.png

 

Result will be:

PLMN-PLMN/MRBTS-113960

1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1750906887749.png

 

 

expected result CC = 
VAR _firstfind =
    FIND ( "/", data[id], 1 )
VAR _secondfind =
    FIND ( "/", data[id], _firstfind + 1 )
RETURN
    LEFT ( data[id], _secondfind - 1 )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

3 REPLIES 3
Jihwan_Kim
Super User
Super User

Hi,

I am not sure if I understood your question correctly, but please check the below picture and the attached pbix file.

 

Jihwan_Kim_0-1750906887749.png

 

 

expected result CC = 
VAR _firstfind =
    FIND ( "/", data[id], 1 )
VAR _secondfind =
    FIND ( "/", data[id], _firstfind + 1 )
RETURN
    LEFT ( data[id], _secondfind - 1 )

If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thanks,

Can you further help if there is other values not finding / delimiter? such (blank) and dn$.

I'm not sure what to be more in the future so Im trying to avoid specify these 2 other values in dax code. 

 

jeongkim_0-1750907255530.png

 

resolved. 

 

INVUNIT Key dn$ =
VAR _firstfind =
    FIND ( "/", 'CM Data - Equip Info'[INVUNIT $dn], 1 )
VAR _secondfind =
    FIND ( "/", 'CM Data - Equip Info'[INVUNIT $dn], _firstfind + 1 )
RETURN
    IF(CONTAINSSTRING('CM Data - Equip Info'[INVUNIT $dn], "/"), LEFT ( 'CM Data - Equip Info'[INVUNIT $dn], _secondfind - 1 ), BLANK())

Helpful resources

Announcements
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