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
Saran_T22
Regular Visitor

Custom SQL in power Bi Desktop

Hello, 

@developer @ad

 

Can someone assist me on how to write a Custom SQL in POWER BI Desktop? I have two tables from Data bricks and I wanted to write a custom SQL inside Power BI Desktop. I tried by going into the function bar, replace the function name Databricks.Catalogs with Databricks.Query. However, I received the error as Expression.Error: The name 'Databricks.query' wasn't recognized. Make sure it's spelled correctly. 

 

Thanks in advance. 

1 ACCEPTED SOLUTION

Hi , @Saran_T22 

My Desktop Version: 2.109.1021.0 64-bit (September 2022).

You can try to update the Desktop Version to try it . 

What's new in the latest Power BI update - Power BI | Microsoft Learn

 

Best Regards,

Aniya Zhang

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

View solution in original post

5 REPLIES 5
v-yueyunzh-msft
Community Support
Community Support

Hi, @Saran_T22 

In Power Query Editor,We use M language to connect the data source.M language is case-sensitive, your error message uses "Databricks.query", you can try to change to the corresponding "Databricks.Query".

 

For more information , you can refer to this document:

Connect to Power BI - Azure Databricks | Microsoft Learn

 

Best Regards,

Aniya Zhang

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

 

Thanks, I tried that as well but same error 'Expression.Error: The name 'Databricks.Query' wasn't recognized. Make sure it's spelled correctly.'

Hi , @Saran_T22 

I test in my Power Bi Desktop , the spell of the function is right. You can enter the function like the screenshot like this:

vyueyunzhmsft_0-1666752215916.png

 

You can read the function document how to use this function.

Best Regards,

Aniya Zhang

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

Strange. When I search for the function with databricks, these are the only options I see. Is it because of my version or something??? 

Saran_T22_0-1666809957583.png

 

Hi , @Saran_T22 

My Desktop Version: 2.109.1021.0 64-bit (September 2022).

You can try to update the Desktop Version to try it . 

What's new in the latest Power BI update - Power BI | Microsoft Learn

 

Best Regards,

Aniya Zhang

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

Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

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.