However, the data in the Power BI model needs to be refreshed when the source data changes.
🔹 DirectQuery
DirectQuery works differently.
Instead of importing the underlying data into the Power BI model in the same way as Import mode, Power BI can send queries back to the underlying data source when users interact with the report.
For example:
A user selects:
• Region = West
Power BI may send a query to the underlying database to retrieve the relevant results.
This can be useful when organizations need to work with large datasets or have specific requirements around data freshness.
However, performance depends significantly on the underlying source and the queries being generated.
So DirectQuery is not automatically "better" than Import.
The appropriate choice depends on factors such as:
• Data volume
• Required freshness
• Source performance
• Modeling requirements
• Security requirements
• Infrastructure
🔹 Live Connection
A live connection is another approach where Power BI connects to an existing semantic model or analytical model rather than importing and independently modeling the underlying data in the usual way.
For example, an organization may already have a centrally managed semantic model containing:
• Sales
• Customers
• Products
• Measures
• Business logic
A report developer can connect to that existing model instead of creating another independent model.
This can help organizations maintain consistent definitions of important metrics.
For example, instead of every analyst creating their own version of:
• Profit Margin
the organization can maintain a centrally defined measure.
🔹 Import vs DirectQuery vs Live Connection
At this stage, remember the fundamental difference:
• Import: Data is brought into the Power BI model.
• DirectQuery: Power BI can query the underlying source when data is needed.
• Live connection: The report connects to an existing analytical/semantic model.
These aren't simply three versions of the same thing. They represent different architectural approaches and have different implications for performance, freshness, modeling, and governance.
🔹 Data Source Credentials
Power BI needs permission to access many data sources.
For example, when connecting to a database, Power BI may need authentication credentials.
Depending on the source, authentication can involve:
• Organizational accounts
• Database credentials
• Microsoft account authentication
• API-related authentication
• Other supported authentication methods
This becomes particularly important when reports are published to Power BI Service.
A report that works perfectly on your computer can still fail to refresh in the Service if the required connection or credentials haven't been configured correctly.
🔹 Data Source Settings
Power BI also provides settings for managing connections to previously used data sources.
You may need to:
• Change credentials
• Edit permissions
• Clear permissions
• Change connection information
• Manage privacy settings
This becomes useful when a source changes.
For example, suppose your development database changes from:
• Server A to Server B
You may need to update the connection rather than rebuilding the entire report.
🔹 A practical example
Post #2129
812