Sales Report in Power BI and Direct Query into SQL Database

Whenever we set connector to our data in Power BI, we have an option to select connection to a certain object (e.g. a table) or there is a second option. That is connection using direct query which secures live connection to data source. We will prepare simple Sales report by few clicks. (as in video). I will show you how to set a connection like that. Direct Query makes sense mainly if we connect to some database and use SQL language.

Sales report with connection to SQL database via direct query

We will create a simple report using Power BI desktop. It will display sales by year through products and product categories:

  • Source: SQL Server/database Temp
  • Table: : udv_SalesByProducts (view created from sample database AdventureWorksDW2014)
  • Report designer: Power BI desktop, load report to cloud afterwards
  • Power BI Gateway: Set gateway to data source

Report is loaded to power bi service. In order for Direcq query to work, it is needed to set Power BI gateway (enterprise). Therefore, we set new cluster which will lead to instance localhost and Temp database.

nastavení power bi gateway

Rate this post
Category: Power BI desktop Sample Reports in power BI

About Ing. Jan Zedníček - Data Engineer & Controlling

My name is Jan Zednicek, and I have been working as a freelance Data Engineer for roughly 10 years. During this time, I have been publishing case studies and technical guides on this website, targeting professionals, students, and enthusiasts interested in Data Engineering particularly on Microsoft technologies as well as corporate finance and reporting solutions. 🔥 If you found this article helpful, please share it or mention me on your website or Community forum

Leave a Reply

Your email address will not be published. Required fields are marked *