In Nov 2018, we released composite models, which allow you to seamlessly add multiple DirectQuery sources and imported data to your models. We have heard your feedback that you would like to do this with sources you previously live connected to, like Power BI datasets and Azure Analysis Services sources.
We are excited to announce that DirectQuery for Power BI datasets and Azure Analysis Services is now in preview! This long-awaited addition allows report authors to use DirectQuery to connect to Azure Analysis Services or Power BI Datasets and, if they want to, combine it other DirectQuery and imported data.
Note that at the moment, we are waiting for some final Azure Analysis Services updates which are rolling out this week. You will be able to try this feature against Power BI Datasets, and support for connections to Azure Analysis Services will come by the end of this week.
Update December 18th 2020: we have just released Power BI Desktop version 2.88.702.0 which fixes the two most common issues we have seen being reported:
- As part of this feature, significant changes were made to the authentication flow for live connections to Analysis Services which applies even when you do not have this preview feature enabled in Power BI Desktop. Users were not able to recover from entering incorrect credentials or selecting the incorrect credential type and would see error messages such as ‘Unable to connect’. You can now either select ‘Retry’ or use the Data Source Settings dialog to update your credentials.
- Converting from a model that is live connected to a DirectQuery model failed if the model contained a measure-only table and the following error message was displayed: ‘The given key was not present in the dictionary’.
This feature is ideal for report authors who want to combine the data from their enterprise semantic model with other data they may own like an Excel spreadsheet, or who want to personalize or enrich the metadata from their enterprise semantic model.
To enable this feature, you will need to enable the preview feature switch in the Report options dialog.
Alberto Ferrari had this to say about this feature: “We got used to monthly updates with Power BI, but not all the months are the same. Guys, the December 2020 version of Power BI is an historical milestone in the development of Business Intelligence. Historical. Milestone. I am not saying this lightly; I am old enough to have seen many things happen in the Business Intelligence world. Some were nice, some were cool… this is neither nice nor cool: this is huge: finally, can seal the marriage between self-service and corporate BI”.
Feel free to leave feedback at this Power BI Community forum post.
Using DirectQuery for Power BI datasets and Azure Analysis Services requires that your report has a local model. You can start from a live connection and add upgrade to a local model or start with a DirectQuery connection or imported data, which will automatically create a local model in your report.
To see what kind of connections are being used in your model, you can look in the status bar in the bottom right corner of PBI Desktop. If you are only connected to an Azure Analysis Services source, you may see a message like the following:
If you are connected to a PBI dataset, you will see a message that lets you know what PBI dataset you are connected to:
If you want to make customizations to the metadata of the fields in your live connected dataset, you can click “Make changes to this model” in the status bar, or you can click the button with the same name in the ribbon.
In Report View, you will see the “Make changes to this model” button in the Modeling tab of the ribbon, and in the Model View, you will see a button with the same name in the Home tab of the ribbon.
Once you click that button, a dialog will pop-up confirming that it will add a local model. Press “Add a local model” to unlock capabilities to create new columns or modify the metadata for fields from Power BI datasets or Azure Analysis Services.
When connected live to an Analysis Services source, there is no local model. To use DirectQuery for live connected sources like Power BI datasets and Azure Analysis Services, you will need to add a local model to your report. Keep in mind that when you publish a report with a local model to the service, a dataset for that local model will be published a well. This is the same behavior as when you publish a report with imported data to the service.
With this feature, you can publish a report and a dataset that is based on other Power BI datasets, which was previously not possible. Together, datasets and the datasets and models they are based on form a chain.
For example, imagine your colleague publishes a Power BI dataset called Sales and Budget that is based on an Azure Analysis Services model called Sales, and combines it with an Excel sheet called Budget.
When you publish a new report (and dataset) called Sales and Budget Europe that is based on the Sales and Budget Power BI dataset published by your colleague, making some further modifications or extensions, you are effectively adding a report and dataset to a chain of length three, which started with the Sales Azure Analysis Services model and ends with your “Sales and Budget Europe Power BI dataset. See the image below:
The chain shown above is of length three, which is the maximum length during preview of this feature. Extending further, beyond the chain length of three is currently not supported and will result in errors.
Please note that when you use this feature, you will see the following security warning.
Data may be pushed from one data source to another, which is the same security warning for combining DirectQuery and import sources in a data model (a feature that was introduced in Nov 2018).
To learn more about this behavior, please visit this article on using composite models in Power BI Desktop.
As this feature is currently in preview, we are eager to collect as much feedback as we can. Here are some things you can try to explore this feature for yourself:
- Connecting to data from various sources: Import (such as files), Power BI datasets, Azure Analysis Services
- Creating relationships between different data sources
- Writing measures that use fields from different data sources
- Creating new columns for tables from Power BI datasets of Azure Analysis Services
- Creating visuals that use columns from different data sources
Please leave feedback at this Power BI Community forum post.
Here are a couple of things that you might run into that is good to know:
- If you refresh your data sources and there are errors with conflicting field/table names, Power BI will resolve the errors for you.
- To build reports in the Power BI service on a composite model that is based on another dataset all credentials will have to be set. On the refresh credential settings page, for Azure Analysis Services sources, the following error will show even though the credentials have been set:
As this is confusing and incorrect, this is something we will take care of soon.
- RLS rules will be applied on the source on which they are defined but will not be applied to any other datasets in the model. RLS defined in the report will not be applied to remote sources, and RLS set on remote sources will not be applied to other data sources.
- Display folders, KPIs, date tables, row level security, and translations will not be imported from the source in this preview build. We plan to add support for these properties when making this feature generally available. You can still create display folders in the local model.
- You may see some unexpected behavior when using a date hierarchy. To resolve this issue, use a date column instead. After adding a date hierarchy to a visual, you can switch to a date column by clicking on the down arrow in the field name and clicking on the name of that field instead of using “Date Hierarchy”:
This behavior will be addressed later in the preview.
For more information on using date columns versus date hierarchies, visit this article.
- You may see some less useful error messages when trying to use AI features with a model that has a DirectQuery connection to Azure Analysis Services. We plan to address them soon.
- Using ALLSELECTED with a DirectQuery source results in incomplete results.
- Filters / Relationships:
- A filter that is applied from a data source to a table from another DirectQuery source can only be set on a single column. This might be supported in the future.
- Cross-filtering two tables in a DirectQuery source by filtering them with a table outside of the source is a bad design and is not supported.
- A filter can only touch a table once. Applying the same filter to a table twice, through one of more tables outside of the DirectQuery source, is not supported.
- During the preview, the maximum length of a chain of models is three. Extending further, beyond the chain length of three is currently not supported and will results in errors. We are considering increasing the maximum chain length in the future.
- Using third party tools, a “discourage chaining” flag can be set on a model to prevent a chain from being created or extended. To set it, look for the DiscourageCompositeModels property on a Model. We have plans to add this functionality to dataset settings in the Power BI service.
- Parameters for database and server names are disabled. There are plans to support parameters in the future.
- Defining RLS on tables from a remote source is not supported. There are no plans to support this in the future.
- Using the following sources as a DirectQuery source is not supported:
- SQL Server Analysis Services (SSAS). We plan to support SSAS Tabular models in the next major release of SQL Server. Support for SSAS Multidimensional models is not planned.
- SAP HANA.
- SAP Business Warehouse.
- Using DirectQuery on datasets from “My workspace” is not supported. This will be resolved shortly after public preview.
- Deleting connections to remote sources that use DirectQuery is not supported. We will address this before the features reaches general availability.
- Using Power BI Embedded with datasets that include a DirectQuery connection to a Power BI datasets or Azure Analysis Services model is not yet supported. We plan to support this as soon as possible.
- Format strings on columns and measures from a remote source are not imported to the composite model. We are looking for your feedback to prioritize this.
- Calculation groups on remote sources are not supported, with undefined query results.
- Some queries may return wrong results when there is a relationship between calculated tables and table(s) in a remote source. Creating calculated tables over a remote dataset is not supported although it is not currently blocked in the interface.
- Sort by column is not supported at this time. This will be added soon.
- APR (automatic page refresh) is only supported for some scenarios depending on the data source type. You can find more information in the APR documentation.
This is the first update of many additional features to come. Here is a sneak preview of what is coming:
- Settings for limiting who can use DirectQuery for Power BI datasets and Azure Analysis Services in the Power BI service.
- More support for capabilities including parameters, display folders, KPI’s, date tables, and translations.
- Integrations with Data Lineage, Data Protection, and Deployment Pipelines.
Please take the preview for a spin and feel free to leave feedback at this Power BI Community forum post. We are looking forward to your feedback!