Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

extract string from values with different len

Hi, I have several Store[point of sale] column values that are compound names, where there is a code and then the actual point of sale name. For example. 123 Ltd. Sea 234 srlsl Montagna 23456 asd ...
  • bhanu_gautam's avatar
    2 years ago

    Anonymous , You can achieve this using DAX and creating a new calculated column

     

    StoreName =
         VAR StoreText = 'YourTableName'[Store]
         VAR SpacePosition = FIND(" ", StoreText, 1, LEN(StoreText))
         RETURN MID(StoreText, SpacePosition + 1, LEN(StoreText) - SpacePosition)
     
    I have also attached PBIX file with sample data