Forum Discussion
SUBSITUTE function does not work correctly in DirectQuery mode
- 3 years ago
Anonymous Any chance you can use a measure? More DAX functions are supported in measures rather than calculated columns. Also, if you can use SUBSTITUTE in a measure and replace all occurences with "|" (pipe character) then you can use PATHITEM to retrieve individual parts instead of using FIND, MID, etc.
Anonymous Why can't you just turn it into a PATH by replacing each instance with "|". Why do you need to replace each one individually?
Hi Greg_Deckler ,
Thank you for your message!
For example, in order to extract the second process from a string that contains 6 processes the code is the following:
Is the case more clear now?
- Greg_Deckler3 years agoCommunity Champion
Anonymous Any chance you can use a measure? More DAX functions are supported in measures rather than calculated columns. Also, if you can use SUBSTITUTE in a measure and replace all occurences with "|" (pipe character) then you can use PATHITEM to retrieve individual parts instead of using FIND, MID, etc.
- Anonymous3 years agoNot applicable
Hi Greg_Deckler ,
Thank you a lot for the solution.
I used the PATHITEM function to split my string in multiple columns.
Have a wonderful day!
Dia