简体   繁体   中英

Generate SQL query from Power BI

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?

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM