sqlpowerbi

Possible to load .SQL file to Power bi?


Just started exploring power bi and I came across a basic question that I find difficult to get a correct solution.

Is it possible to load .sql file in power bi and create a report for it? thanks


Solution

  • It is not possible to load a .SQL file in a Power BI report, but you can specify a SQL query when adding a data source, if you expand the Advanced Options:

    Power BI SQL Query

    If your query is complex you can create a stored procedure to wrap all of the code and then call the stored procedure from Power BI, e.g. EXEC NameOfYourStoredProcedure