Forum Discussion

MagMag31's avatar
MagMag31
Regular Visitor
3 years ago
Solved

Extract String after certain symbol with a measure

Hello,


I need help please, how do you extract the text from the string after the "-" and the second space (column Text), into a new column (column Result), only with a measure. without using a calculated column or in M-Script because I connect to a dataset where I can only create measures


i think we can do it with selectedvalue but I didn't manage to do it

textResult
001 - HelloHello
15 - HiHi
22 - Thank youThank you


thank you

  • Hi MagMag31 
    Please try

    Result =
    PATHITEM ( SUBSTITUTE ( SELECTEDVALUE ( 'Table'[Text] ), " - ", "|" ), 2 )

2 Replies

  • tamerj1's avatar
    tamerj1
    Icon for Community Champion rankCommunity Champion

    Hi MagMag31 
    Please try

    Result =
    PATHITEM ( SUBSTITUTE ( SELECTEDVALUE ( 'Table'[Text] ), " - ", "|" ), 2 )
    • MagMag31's avatar
      MagMag31
      Regular Visitor

      It works, thank you so much !!👍