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)
- Home › Transform data › Data source settings (or File › Options and settings › Data source settings).
- Select Data sources in current file › select
QCTEST01;QuickCommerceDB› Change Source… › typeQCSERVER01› OK. - Edit Permissions… to change credentials, encryption or the privacy level; Clear Permissions to forget saved credentials.
- 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.
Ravindra Bagale's Tip – मराठी
मित्रांनो, Formula.Firewall error घालवण्यासाठी बरेच students प्रत्येक source ला "None" privacy level देतात. आधी error समजून घ्या: Private source आणि Public web source एकत्र करणं यापासूनच privacy levels संरक्षण करतात. Levels बरोबर set करा (company sources साठी Organizational) आणि गरज असेल तर query ची रचना बदला. Practice करा, मग एकदम सोपं वाटेल.
Ravindra Bagale's Tip – हिंदी
दोस्तों, Formula.Firewall error हटाने के लिए बहुत से students हर source को "None" privacy level दे देते हैं. पहले error को समझो: Private source को Public web source के साथ जोड़ना – privacy levels इसी से बचाते हैं. Levels सही set करो (company sources के लिए Organizational) और ज़रूरत हो तो query की बनावट बदलो. Practice करो, फिर बहुत आसान लगेगा.
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.