1.3 Data Source Settings and Parameters
Key Takeaways
- Data source settings control credentials, privacy levels, and connection properties for each source.
- Privacy levels (Private, Organizational, Public) determine how data from different sources can be combined.
- Parameters allow dynamic connection strings, enabling environment switching and user-configurable queries.
- Credentials can be updated in Desktop via Data Source Settings or in the Service via dataset settings.
- Query parameters use the M language and can be referenced in connection strings, filter values, and transformations.
Quick Answer: Data source settings manage credentials and privacy levels for each connection. Privacy levels (Private, Organizational, Public) control data mixing between sources. Parameters let you create dynamic connection strings so you can switch servers, databases, or filter values without editing queries manually.
Data Source Settings
Data source settings are managed in Power BI Desktop under:
File → Options and Settings → Data Source Settings
What You Can Configure
| Setting | Description |
|---|---|
| Credentials | Username/password, OAuth tokens, API keys |
| Privacy Level | Private, Organizational, or Public |
| Connection Type | Encryption settings, certificate validation |
| Permissions | Edit or delete source credentials |
Managing Credentials
Each data source stores credentials independently. When credentials expire or change:
- Open Data Source Settings in Power BI Desktop
- Select the affected data source
- Click Edit Permissions → Edit Credentials
- Enter new credentials and test the connection
In the Power BI Service, credentials are managed per dataset:
- Navigate to Settings → Datasets → select the dataset
- Under Data source credentials, configure each source
- Service credentials are separate from Desktop credentials
Exam Tip: When you publish a report, credentials do NOT transfer to the Service. You must configure credentials in the Service separately.
Privacy Levels
Privacy levels are a critical concept that controls how Power BI combines data from different sources.
The Three Privacy Levels
| Level | Description | Combining Rules |
|---|---|---|
| Private | Sensitive data (HR records, financials) | Only combined with other Private sources from the same source |
| Organizational | Internal business data | Can be combined with other Organizational sources; isolated from Public |
| Public | Publicly available data (web, open data) | Can be combined with any source |
Privacy Level Implications
When combining data from sources with different privacy levels:
- Private + Public = Blocked (Power BI will not combine these)
- Private + Organizational = Blocked
- Organizational + Organizational = Allowed
- Organizational + Public = Allowed (Organizational level is maintained)
- Public + Public = Allowed
Warning: Setting the privacy level to "None" disables privacy checks entirely. This is useful for development but should never be used in production with sensitive data.
Configuring Privacy Levels
Privacy levels can be set:
- Per data source — In Data Source Settings when first connecting
- Globally — Under File → Options → Privacy
- "Always combine data according to privacy settings" (recommended)
- "Combine data according to each file's privacy level settings"
- "Always ignore privacy level settings" (development only)
Parameters
Parameters in Power BI are variables that can be referenced in queries, connection strings, and transformations.
Creating Parameters
In Power Query Editor:
Home tab → Manage Parameters → New Parameter
Configure:
- Name: Descriptive identifier (e.g., ServerName, DatabaseName)
- Type: Text, Decimal Number, Date/Time, True/False, etc.
- Suggested Values: Any value, List of values, or Query
- Default Value: The initial value
- Current Value: The active value used in queries
Common Parameter Use Cases
1. Dynamic Server/Database Connections
Create parameters for server and database names to switch between development, test, and production environments without editing queries:
let
Source = Sql.Database(ServerName, DatabaseName)
in
Source
2. Dynamic Filter Values
Use parameters to filter data at the source, reducing the amount of data loaded:
let
Source = Sql.Database("myserver", "mydb"),
Filtered = Table.SelectRows(Source, each [Year] >= StartYear)
in
Filtered
3. Dynamic File Paths
Reference a parameter for file locations:
let
Source = Csv.Document(File.Contents(FilePath))
in
Source
Modifying Parameters
Parameters can be changed in two ways:
- Power BI Desktop: Home → Transform Data → Edit Parameters
- Power BI Service: Dataset Settings → Parameters section
Exam Tip: When using parameters for data source connections, changes in the Power BI Service will trigger a data refresh with the new parameter values.
Parameter Best Practices
- Use descriptive names (ServerName, not Param1)
- Set suggested values as a list when there are known options
- Always provide a default value for published reports
- Document parameter purposes in a README table within the model
- Use parameters with deployment pipelines for environment management
Privacy Levels and the Formula Firewall
Privacy levels exist to stop Power Query from accidentally leaking sensitive data to an external source. Internally this protection is enforced by the Formula Firewall, which prevents a query that touches one source from passing data into a query that touches a differently-classified source within the same evaluation.
This is why a query that combines a Private HR table with a Public web API throws a "Formula.Firewall: Query references other queries, so it may not directly access a data source" or a privacy-level error at refresh time. The fix is rarely to disable privacy — instead, separate the offending logic into staging queries so each query references a single source, or align the privacy levels when the data truly may be combined.
Parameters in Deployment Pipelines
Parameters become especially powerful with deployment pipelines (Dev → Test → Production). Each pipeline stage can override a parameter's value through parameter rules, so the same .pbix points at the development server in Dev and the production server in Production without any manual M edits.
| Parameter pattern | Benefit |
|---|---|
ServerName / DatabaseName | Switch environments per pipeline stage |
RangeStart / RangeEnd (Date/Time) | Drive incremental refresh windows |
RowLimit | Load a small sample in Dev, full data in Prod |
Exam Tip: Remember the two-part rule for moving a report to the Service: (1) credentials never publish with the file — set them in dataset settings; and (2) parameter values can be edited in the Service under Dataset settings → Parameters, which triggers a refresh with the new values.
On the Exam
The PL-300 frequently tests:
- Understanding privacy level implications when combining data sources
- Creating and modifying parameters for dynamic connections
- Managing credentials in both Desktop and Service
- Knowing that credentials don't transfer when publishing
- Using parameters with deployment pipelines for environment switching
A Power BI model combines HR salary data (Private) with a public API for exchange rates (Public). What happens when the model is refreshed?
You need to deploy a Power BI report across development, test, and production environments with different database servers. What is the recommended approach?
After publishing a report from Power BI Desktop to the Power BI Service, scheduled refresh fails with a credential error. What is the most likely cause?