Advance your Data & AI career with 50 days of live learning, dataviz contests, hands-on challenges, study groups & certifications and more!
Get registeredGet Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now
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 from the left of the delimiter.
Here is what my data looks like the following:
Answer1_Right1
Answer2_Right2
123_Right3
Pretty sure direct query does not allow that. You would have to switch to import/composite mode.
Hi @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
)
Hi
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
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 Zhi
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!
Check out the October 2025 Power BI update to learn about new features.