Ravindra BagaleCourses & study guides

4. Connecting to Databases: SQL Server, MySQL, DirectQuery and Live Connection

4.9 Data Source Settings, Changing Sources and Privacy Levels

Steps in Power BI – change a source (e.g. Test server → Production server)

  1. Home › Transform data › Data source settings (or File › Options and settings › Data source settings).
  2. Select Data sources in current file › select QCTEST01;QuickCommerceDB › Change Source… › type QCSERVER01 › OK.
  3. Edit Permissions… to change credentials, encryption or the privacy level; Clear Permissions to forget saved credentials.
  4. Better: use a parameter for the server name (Module 10), so switching is a single change.

Privacy levels decide whether Power Query may send data from one source to another while combining them. For example, it may fold a filter that uses values from an Excel file into a SQL query.

Level Meaning Example
Private Sensitive, must not be sent to other sources Customer phone list, bank statements
Organizational Can be shared with trusted sources inside the organisation QuickCommerceDB, company SharePoint
Public Anyone can see it A public web page of Maharashtra district names
None Not set –

If queries combine sources with incompatible levels, or reference each other in a way the engine cannot isolate, you see Formula.Firewall: Query '…' references other queries or steps, so it may not directly access a data source. Please rebuild this data combination. Fixes: set correct privacy levels (Data source settings › Edit Permissions), or restructure the queries so that each source is first loaded in its own query and combined afterwards. The global setting (File › Options and settings › Options › Global › Privacy) can ignore privacy levels. Use that fakt when you understand the data-leak risk.

Practice task

Create a parameter (बदलता येणारे मूल्य, जे अनेक ठिकाणी वापरता येते) ServerName with values QCTEST01 and QCSERVER01, use it in Sql.Database(ServerName, "QuickCommerceDB"), and switch between them. Then set the Customer source to Private and the DarkStore Excel file to Organizational.

Ravindra Bagale's Tip

Friends, many students set every source to the "None" privacy level to make a Formula.Firewall error disappear. Understand the error first: combining a Private source with a Public web source is exactly what privacy levels protect against. Set the levels correctly (Organizational for company sources) and restructure the query if needed. Practise, and it will feel very easy.

Thodkyaat sangaycha tar (quick recap)

Server aani database che nav exact ghya, garaj titkech tables aana, folding check kara, aani DirectQuery vs Live connection madhla farak lakshat theva. Gateway shivay scheduled refresh chalat nahi, he visru naka. Aata pudhe jaauya web data kade.