Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
1 year ago
Solved

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.  Sin...
  • Jihwan_Kim's avatar
    1 year ago

    Hi,

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

     

     

     

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