Generate SQL query from Power BI

671 views Asked by At

I have connected my SQL database (based on a star schema design) to Power BI in order to build dashboards. However, I have to write (test) SQL queries now that would create the same results as in my Power BI dashboards.

Does Power BI automatically generate such queries or is there a program with which I can generate SQL queries out of a Power BI dashboard? In general, how do I write queries that give the same results as the Power BI dashboard that I have designed?

1

There are 1 answers

0
fillrate On

Try to use the SQL Server Profiler. It's a simple, standard tool from Microsoft SQL Server Management Studio (Tools -> SQL Server Profiler). You can connect to SQL Server to get a trace log with all actions/queries on your server.

Also, Microsoft counts Profiler as a deprecated tool and suggests that you use Extended events instead of it. But Profiler is still working.