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

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

Reply
Chris1300
Helper II
Helper II

Can you create a column during SQL query connector?

I am doing a query to get data using the Azure Synapse Analytics SQL connector. The database is in Azure Synapse. My current query: 

 

SELECT TOP (100) [SESSION_REQUEST] ,[INSERT_TIME] ,[REQUEST_ID] ,[SESSION_ID] ,[COMMAND] FROM [abc].[SessionRequests]

 

I would also like to have a new column created that will do a RegEx on [COMMAND].

This is my RegEx code: [Ff][Rr][Oo][Mm]\s[\s]+

 

Does SQL query in PowerBI allow this type of query where you can create a new column during the query code? How can I do this? 

 

I have seen other posts about using R or Python Scripts to do the RegEx, but this is NOT an option for me. 

1 ACCEPTED SOLUTION
Chris1300
Helper II
Helper II

I ended up using the power query builtin function for splitting and extracting text columns. It involved multiple steps and different functions but got it close to using RegEx like.

View solution in original post

3 REPLIES 3
Chris1300
Helper II
Helper II

I ended up using the power query builtin function for splitting and extracting text columns. It involved multiple steps and different functions but got it close to using RegEx like.

aj1973
Community Champion
Community Champion

Hi @Chris1300 

You can use Power Query to add queries to your selected one and ultimately you can also use DAX.

Regards
Amine Jerbi

If I answered your question, please mark this thread as accepted
and you can follow me on
My Website, LinkedIn and Facebook

Shaurya
Memorable Member
Memorable Member

Hi @Chris1300,

 

This link may provide you some information that you need:

 

https://learn.microsoft.com/en-us/power-query/power-query-folding

 

Mark this post as a solution if that works for you!

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.