Forum Discussion

Markzolotoy's avatar
Markzolotoy
Icon for Impactful Individual rankImpactful Individual
5 years ago
Solved

Modify Query

After getting data from SQL table how can I go back and modify my query?    thanks
  • ToddChitt's avatar
    ToddChitt
    5 years ago

    Yes.

    Click on Transform Datato get into Power Query. Find and click on the SQL query in the list of queries. Now right-click on the last Applied Step on the right, and select "View native query". You will get the *exact* SQL statement that Power BI will issue to the SQL Server to get this data. Notice that things like WHERE clauses are pushed down to the SQL layer, so are GROUP BY and many others.

    Only formal RDBMS will support this feature. You can't get it with Excel or CSV or a lot of others. Only SQL, Oracle and a few others.

  • ToddChitt's avatar
    ToddChitt
    5 years ago

    To execute a stored procedure to get data from Power BI, you need to use the Advanced Options.