Forum Discussion
reetu_k
Microsoft Employee
6 years agoSplit Columns using delimiter in direct query mode
I have a direct query and have the need to split my column using a delimiter like '_'. Since I am in the direct query mode I am not able to use the split column option. I want a new column with data ...
Mariusz
Community Champion
6 years agoHi reetu_k
Try this, but not sure if it will work in Direct Query Mode
Measure =
VAR __text = SELECTEDVALUE( 'Table'[Column1] )
RETURN
LEFT(
__text,
SEARCH( "_", __text, 1, 1 ) -1
)
Best Regards,
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
LinkedIn
Mariusz
If this post helps, then please consider Accepting it as the solution.
Please feel free to connect with me.
reetu_k
Microsoft Employee
6 years agoHi
Unfortunately this did not work for me as Search returns the position of the '_' from the string - So I am getting a numerical response back
- dax6 years ago
Community Support
Hi reetu_k ,
As I know, find and search can't used in calculated column when you using direct query, so I think you could try to use t-sql query to create the split column when you use direct query.
Best Regards,
Zoe ZhiIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.