Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Measure to Extract specific characters from a String

I have a field with below values.    SABBANK\O45678 SABBANK\345670 INDBANK\234090 SBIBANK\098765   I need to create a measure to give the below values present after "\". I need only measure an...
  • Greg_Deckler's avatar
    4 years ago

    Anonymous I think:

    Measure = 
      VAR __String = MAX('Table'[Column])
      VAR __Slash = SEARCH("\",__String)
    RETURN
      MID(__String,__Slash+1,LEN(__String)-__Slash)
  • VahidDM's avatar
    4 years ago

    Anonymous 
    Try this measure:

    New Value = 
    Var _NoCh = search("\",FIRSTNONBLANK('Table'[Value],""))
    Var _TEXT = FIRSTNONBLANK('Table'[Value],"")
    return
    right(_TEXT,LEN(_TEXT)-_NoCh)

    The output will be as below:

     

     

     

     

    Did I answer your question? Mark my post as a solution!

    Appreciate your Kudos  !!