Forum Discussion

supansat's avatar
supansat
Regular Visitor
4 years ago
Solved

Power BI destop can create sql command.?

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

 

  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi supansat ,

     

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

    See the example from this link.

     

    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.

4 Replies

  • 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.

  • Anonymous's avatar
    Anonymous
    Not applicable

    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.

     

    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.

    • supansat's avatar
      supansat
      Regular Visitor

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

      Could you help to show exemple.?

      • Anonymous's avatar
        Anonymous
        Not applicable

        Hi supansat ,

         

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

        See the example from this link.

         

        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.