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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
supansat
Regular Visitor

Power BI destop can create sql command.?

Could I create sql command in PowerBI. [ look like connection function in Excel].?

 

1 ACCEPTED SOLUTION

Hi @supansat ,

 

The field 'SQL statement' is to import the required data from the data source.

See the example from this link.

database-select-dialog.png

 

Best Regards,

Stephen Tao

 

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

4 REPLIES 4
v-stephen-msft
Community Support
Community Support

Hi @supansat ,

 

We can connect to the SQL server data source in Power BI Desktop.

And Power BI Desktop provides a set of advanced options that you can add to your query if needed when you connect to SQL server. I don't know if it can help you.

7.png

 

Another place that involves query is query folding, you can refer to https://docs.microsoft.com/en-us/power-query/power-query-folding

 

 

 

Best Regards,

Stephen Tao

 

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

I try to add sql command in feild 'SQL statement...' but It show error after running.

Could you help to show exemple.?

Hi @supansat ,

 

The field 'SQL statement' is to import the required data from the data source.

See the example from this link.

database-select-dialog.png

 

Best Regards,

Stephen Tao

 

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

amitchandak
Super User
Super User

@supansat , I doubt so. But you can check what SQL is created in case of the direct query using some SQL tool on the database.

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.