When data are embedded into saved Power BI report - powerbi

When data are embedded into Power BI Desktop saved or shared report?
As far as I understand, PBI Import Mode will always embed all input tables data into saved or shared .pbix report. Am I right?
Suppose you have table A, and than based on it Aggregation Table B. What data would be saved to report if I report depended on table B?
Does PBI save any data with saved/shared report in DirectQuery mode?

When data are embedded into Power BI Desktop saved or shared report?
Data is saved in the model when dataset mode is Import or Composite a.k.a. Dual (i.e. both Import and DirectQuery). For more information see Dataset modes in the Power BI service and Manage storage mode in Power BI Desktop.
As far as I understand, PBI Import Mode will always embed all input tables data into saved or shared .pbix report. Am I right?
Yes, the imported data (if any) is always in the .pbix file. When published, it is split into separate report and dataset.
Suppose you have table A, and than based on it Aggregation Table B. What data would be saved to report if I report depended on table B?
It depends. There are options to reference or duplicate table. Also take a look at Use aggregations in Power BI Desktop.
Does PBI save any data with saved/shared report in DirectQuery mode?
No, in DirectQuery data is not imported, as noted in the documentation:
DirectQuery mode is an alternative to Import mode. Models developed in DirectQuery mode don't import data.
In this case queries are sent directly to the data source. There is some temporary caching though.

As far as I understand, PBI Import Mode will always embed all input
tables data into saved or shared .pbix report. Am I right?
Yes, import mode copies the data from the source into the pbix file.
Does PBI save any data with saved/shared report in Direct Query mode?
No, with direct query mode it only stores the connection details. If you create a new DAX calculated table based on the main Direct Query, it is evaluated and loaded into memory when the file is opened, so it only saves the query that generates the table, not the data in the table.
What you can do is change the pbix file extension to .zip and have a look inside the file for data and whats saved in the file
Hope that helps

Related

How to import data from an excel file when report is using an existing power bi dataset?

I have a power bi report that connects to another power bi dataset.
I want to import an excel file into the new report's dataset without making any changes to the original dataset.
On this new report (that uses another dataset) the transform query button is grayed out so I'm not sure how to import an excel file. Does power bi support this?
Use the Get data button on the home tab. Should be a simple upload of the excel file. Make sure to use the desktop version. Using the model tab on the far left side you can link variables (many to many, many to one, etc.) (if the datasets are related)
What you`re looking for is a Composite Model. If you want to use it, you first have to enable the following Preview features in Options:
After a restart you can click on Transform data and Power BI will add a local model and allow you to add further data sources like Excel files to it.

Which data is stored in Power BI - the one after query or the one after modelling?

In Power BI first we get source data. And then we add multiple query steps to filter data/remove column/etc. Then we add relations and model the data.
We can have calculated columns that are stored in the data. And measures that are not stored in the data but calculated on the fly.
Which data is stored in Power BI - the one after query or the one after modelling?
Power BI has 3 connection types for data access. They are import, direct query and live connections.
If we use import method as a connection type, data imported into Power bi file using Power BI desktop. So all the data always stays in disk. When query or refresh, data stays in computer memory.This data we can use to query and modeling. After work, we save the Power BI file it will save as file with .pbix extension. Data compressed and stored inside this file.
in direct query mode , data stays in remote location and we can connect data. each time we refresh or make change in slicer request goes to data source and bring back data to power bi. In this method, we can't access data but we can create data model.
live connection is another method. It only support for few data sources. In this method, data not stored in computer memory and can't create data model using Power BI desktop.
Power BI is very well documented. Many of the questions you've recently asked are answered in that resource, so please take a look. I get the feeling that you are using this community because you don't want to read the manual. I strongly suggest you take a look at the documentation, because everything we write in answer to your questions has already been written and documented, and SO is not meant to be a shadow user guide for well documented systems.
Depending on the data source you use in Power BI Desktop, Power BI supports query folding, which will do as much processing of the data at the source (for example SQL Server).
If query folding is not possible because the source does not support it, then the source data is loaded before the query steps are applied.
Read more about query folding here: https://learn.microsoft.com/en-us/power-bi/guidance/power-query-folding
When you perform additional modelling after the Power Queries are loaded, i.e. creating tables with DAX, adding columns, etc., these will be performed when the PBIX file is published to the Power BI service, and they will be performed each time the data is refreshed with the data gateway.

Adding a new data source to the existing report built with a dataset

I am new to Power BI and trying to build a report for one of our business requirements. I have access to a Power BI dataset which I imported in the Power BI desktop version. I also need to import an excel file placed in SharePoint/OneDrive and merge the data in these two sources. When I am trying to do this, I am getting the below error.
Is this feature not available in Power BI?
If not, is there a way to achieve this objective?
You are connected to a Tabular SSAS cube or Power BI Service dataset, you can't add other data sources.
You can only mix data source types in the modes direct query and import. See the limitations section of the MS docs
One option would be to recreate the Tabular data model in Power BI, over the base table/views it is based on in direct query mode, then add the SharePoint list, or add it as a table in the Tabular/Power BI Service Dataset

Keep historical data in local database to speed up Power BI

Without a premium licensing, is it possible to simulate an incremental refresh to speed up Power BI Desktop?
Say, we keep all the data before a certain date in a local Access database and connect to the "live" database only for data after that date?
The question is how to export the historical data from one or several pbix file to Access, how can we do that?
Try doing it as a composite model. Load your archive data as one query using Import and your recent data as another query using Direct Query. Then you can union those to tables as a DAX calculated table and use that for your report.
If you aren't using Direct Query for recent data or you need to be refreshing your model, then I believe you can uncheck "Include in report refresh" in the query editor (right-click on the query in the Queries pane) and it won't refresh that archive table unless you specifically ask it to.

Can we use both Direct Query and import option in a single Power BI Report?

I'm Trying to create a Power BI Report where I have Two data Sources. One is a SQL Server Database and the other is an excel file. I was wondering If I could import the Excel File and get the data from the SQL server database using a Direct query.
Is that possible?
Power BI currently doesn't support mixing DirectQuery and Import data sources in the same report. You have to choose one or the other for the entire report.
In your case, you could import the data from the Excel file and also get the data from the SQL Server, using the Import mode for both (and have a copy of the data embedded in your report file).
If you import the SQL data using DirectQuery, then you won't be able to import the Excel file.
There's a feature request to allow mixing DirectQuery and Import which you can vote.
Since 2021-01-19 Power BI supports composite models.
composite models in Power BI Desktop