Have you ever had a situation where you want to re-use part of the model in another report? Imagine two report visualizers in your team who want to create Power BI report visualizations from your data model. You have already done some modeling and calculations. How can this be done the best way without a high maintenance cost? The answer is a shared dataset in Power BI. In this article, you will learn about:
- What is a shared dataset in Power BI?
- How can the shared dataset help in Power BI development?
- Where is the place of the Shared dataset in the Power BI architecture?
- How does the shared dataset work behind the scene in the Power BI service?
- What are Certified and Promoted Datasets?
To learn more about Power BI, read the Power BI book from Rookie to Rock Star.
What is the Dataset in Power BI?
When you create a Power BI report (or let’s call it a *.PBIX file), the report has two components (if the data connection mode is import data); A report and a dataset. When you are in the environment of Power BI Desktop, you can’t see the separation that easily unless you go to the task manager and see the dataset running behind the scene under the Power BI Desktop task threads.
However, when you publish the PBIX file into the service (the Power BI website), you can easily see that there are two objects; A report and a Dataset.
- The report is the visualization layer of your Power BI implementation
- The dataset includes the data, tables, relationships, calculations, and connection to the data source.
You can schedule the refresh for the dataset and connect to on-premises sources (through a gateway) or cloud-based sources.
What is included in the dataset?
So far, you know that a dataset is a separate object from the report. However, what parts of the development are precisely in the dataset. Here are some of the components that are part of the dataset;
- The connection to the data source
- tables and their data
- calculated columns, tables, and measures
- formatting and settings of the fields (visibility, formatting, display folders, sort by column, data category, etc.)
Anything that somehow is related to the data is part of the dataset.
What is a Shared Dataset?
Now that you know about the dataset let’s talk about the Shared Dataset. A shared dataset is a dataset shared between multiple reports. You can create a new report from an existing dataset through the Power BI website. This will create a report without a dataset. In fact, the dataset of that report will be the dataset that you are creating the report from. This type of report is also called a Thin report.
A thin report is a report without a dataset. This report is usually connected live to an existing dataset.
You can also create thin reports (reports without a dataset of their own) from the Power BI Desktop. To do this, you can choose Power BI Dataset under the Data Hub;
Thin reports will have the same attributes as the Power BI reports connected using Live Connection. They give you the ability to create report-level measures, but the modeling is limited beyond that point. Unless you create a composite model using DirectQuery to a Power BI dataset.
A shared dataset is a dataset that is shared between multiple reports. When that dataset gets refreshed, all of those reports will have the new data. A shared dataset is one step closer to the multi-developer tenant in the Power BI environment.
How to create a shared dataset?
Any Power BI dataset can be a shared dataset. To use it as a shared dataset, first, you need to publish your PBIX file to the Power BI Service. After the publication, you will usually have a dataset and a report. The dataset can then be used for creating other reports.
The question that may arise now is; what if I want to create a dataset without a report?
The answer is; that at the time of writing this blog article, using Power BI Desktop, it is not possible to do that. You can create a Power BI file (which includes the dataset and report in one), then publish it to the service. After publishing it to the service, you can then delete the report associated with that dataset. The challenge for this method, however, is that any future updates in the Power BI dataset and re-publish of that will re-publish the report again, and you have to go and remove it. It might be easier just to ignore the report associated with the dataset. Or simply just use that report for troubleshooting your dataset.
Sharing Datasets Across Multiple Workspaces
For a long time, sharing datasets was only possible inside a workspace. You could not use a dataset from workspace one as the source for a report in workspace 2. However, the feature became available a few years ago, and you can share the dataset even across multiple workspaces. When you get data from a Power BI dataset through the Power BI Desktop, you have the option to select which dataset you want to get data from;
External Dataset: How does Shared Dataset work behind the scene?
When you get data from a Power BI dataset which is workspace 1, and then save your report in workspace 2, you will see something called an External dataset (it was called Linked Dataset previously). The fact is that what you see is just a link. Power BI will bring a link to that dataset into the new workspace. This link helps you to understand when the dataset gets refreshed last time.
Here is what an External dataset looks like in the lineage view.
An External dataset is not a copy, It is a link to the original dataset.
Why Shared Dataset?
Now the million-dollar question is that why should you use a shared Dataset? What is good about it? What are its main benefits? Let’s see that through an example.
Let’s assume you are the Power BI Developer of a Sales.PBIX file in your team. Your team recently hired a data analyst with good visualization skills named Maggie. Maggie wants to build some visualization on your Sales.PBIX file, However, you want to do some modeling (writing calculations, bringing more tables, adding relationships, etc.) simultaneously. So how would you do this?
Suppose you give Maggie a copy of your Sales.PBIX file, and name it Maggie’s Sales.PBIX, she can build new visualization, but now her version is different from your Sales.PBIX file. What if you want to merge your changes (new calculations and tables, etc.) into her file? This brings lots of headaches in managing two different versions of the file.
Instead of copying files, you can create a shared dataset, and Maggie creates a Power BI thin report connected to the same dataset. This way, maintaining the solution will be much easier in the future. Whenever you update your dataset, Maggie needs to refresh the file to get the new changes. A shared dataset separates the modeling layer of your Power BI solution from the rest of it. Like the Dataflow that separates the ETL layer.
Shared Dataset in the Power BI Architecture
I have written a lot of articles about the architecture of Power BI; in fact, I gathered them in a book. However, in one article specifically, I explained how Dataflow and Shared datasets could play an important role in the multi-developer tenant of Power BI implementation.
In a nutshell, using the Dataflow makes sure that you can bring the data well prepared in a central area, which you can call a centralized data warehouse in the Azure Data Lake. And using the shared datasets, you can build data models that multiple reports can use. Here is how the architecture works in the diagram view;
Instead of having silos of Power BI reports and files everywhere, You can build an architecture that works best with multiple developers, less redundancy in the data, in the code, and the logic, and an easier maintenance approach. I highly recommend reading this article to learn more about this architecture and learn how the shared dataset located in this architecture is a key element.
Endorsement: Certified and Promoted Datasets
When Power BI developers use the function of Getting data from Power BI dataset, They see all datasets from all workspaces that they have access to. This might be a bit confusing. There might be tons of datasets shared in the environment. The developer ends up with questions such as: Which of these is the one I can use? Which of these are valid to use? which of these are reconciled and tested? Which of these are reliable to use? Etc.
A labeling system is added to the Power BI datasets, which helps in this scenario. You can mark some of the datasets as Certified or Promoted. To certify a dataset, there is an approval process that can assure the dataset has passed some of the tests. You can clarify through this labeling system what datasets are good to be used as the source and what are not. You can build the concept of Gold, Silver, and Bronze datasets. Gold datasets are fully tested, reconciled, and then down to other levels, whereas the Bronze dataset is a dataset that hasn’t been through any testing yet.
To use this labeling system, the creator of the dataset can go to the setting of the dataset;
In the settings, you can set the Endorsement level as below;
As you can see, the Certified option might not be available. The Power BI tenant administrator has the authority to enable that labeling and give access to whom needed in the Tenant Settings;
You can also set if promoted or certified content is discoverable throughout the tenant or not under the same Tenant settings of Admin Portal.
The endorsement labeling system helps Power BI developers then see what is the level of certification that a dataset has to be used as a shared dataset, and then can select based on that respectively;
You can use a shared dataset to have centralized data models serving multiple reports. You can reduce the maintenance time, the redundancy of the code, and the data through this approach. Having the labeling system of the certified or promoted dataset is also a great way of putting some process and governance in place to ensure the shared datasets have been through some process of testing and reconciling.
I suggest reading these links to study more;
- Live Connection in Power BI, Thin reports, and report-level measures
- Composite Model in Power BI
- DirectQuery to Power BI Dataset
- Dataflows in Power BI
- Power BI Multi-developer architecture
Are you using shared datasets in your implementation? If yes, I like to hear about your experience. If not, I like to know why you don’t find it useful for your implementation. Either way, please share your thoughts in the comments below.