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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

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
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors