Forum Discussion
Anonymous
2 years agoNot applicable
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 Lake
I just want to have the store names Sea, Montagna, Lake appear in a barplot. How do I extract them? Thank you very much
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
3 Replies
- bhanu_gautamSuper User
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 - AnonymousNot applicable
Pls check the solution.
- AnonymousNot applicable
thank you, both works