Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
reetu_k
Microsoft Employee
Microsoft Employee

Split 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 from the left of the delimiter.

 

Here is what my data looks like the following:

 

Answer1_Right1

Answer2_Right2

123_Right3

4 REPLIES 4
Greg_Deckler
Community Champion
Community Champion

Pretty sure direct query does not allow that. You would have to switch to import/composite mode.



Follow on LinkedIn
@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
DAX For Humans

DAX is easy, CALCULATE makes DAX hard...
Mariusz
Community Champion
Community Champion

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 
    )

 

Best Regards,
Mariusz

If this post helps, then please consider Accepting it as the solution.

Please feel free to connect with me.
LinkedIn

 

reetu_k
Microsoft Employee
Microsoft Employee

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

dax
Community Support
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 Zhi

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors