Skip to main content

Performance Troubleshooting: Tabular Model in Power BI

For the last 2 years, I have been using Power BI as one of the core tools to provide different data insights for the top management. 

Together with my great team, I was constantly improving our key reporting tools. As in a classical way we were facing problems with the performance. The rising complexity reflects on the user's response and on the stability of report updates.

The Tabular model allows boosting both the performance and the speed of development of massive reports with complicated data models and too many DAX.  

Let us consider the use case and different ways of improving report performance including usage of the Tabular model.

About DataSet: 

  • Classical OLAP schema - Snowflake 
  • Size of fact table - over 40 mln rows
  • Over 40 dimensional tables
  • Data Connectivity Mode - Import
  • Type of Connector - SQL Server Database
The report was hosted in Power BI Report Server. 

Ways of investigation and steps to improve the performance:
  1. Migrate report from on-premise PBI RS to the Cloud Solution PBI Service. The benefits of PBI Service you can find here
  2. Use built-in Performance Analyzer 
  3. Apply Incremental refresh on a fact table
  4. Rewrite all connectors on stored procedures instead of direct connection to the tables
All these steps allow us to improve a lot of features regarding our service:
  1. Quality and diversity of interaction with the report: customized dashboards for each customer based on the same report, personal bookmarks by their personal needs, etc.
  2. Accessibility to the report becomes more friendly - no need to connect via VPN
  3. Data are more up-to-date - PBI Service allows to refresh 8 times per day  (of course it should be synchronized with the ETL process in the database)                                             
Still, the performance of the report and the speed of the user's response were not improved essentially. 
At the same time, the increasing number of customers and the variations of their requests permanently require fast and effective decisions. 

At the start, pbix file weighed approximately 250 MB. Later, the size jumped to 700 MB due to the massive extension of data and an increasing number of different hot topics that should be highlighted all in one place. To apply new changes of production might take over 30 mins. 
The main bottleneck - the constantly increasing number of rows in the dataset requires serious transformations.

In this case, we decided to take a look at the in-memory data engine that intends usage of Tabular model database. It requires another method of connecting the data - Live Connection. 
Power BI allows connection to data by 3 methods and at that time we used import data type of connectivity:

The advantages of usage Tabular data model:
  • In-memory data engine that performs faster 
  • The size of the Power BI file decreases essentially (in my case from 700 Mb to 4 Mb). Data is no more stored in the Power BI model. Power BI has only a visualization layer
  • All processes regarding the changes in the data model are done on the server-side via Visual Studio. It allows to deploy changes in GIT and revert  them in case of any problem
  • Tabular contains 'partitions' to speed up the process of refreshing data on server-side
  • Refresh data changes that are set up on the server-side reflects at once on Power BI Service where the report is distributed for users. No need to set up scheduled refresh on Power Service
Here is presented a sample architecture:

In our case ETL process runs several times per day, after ETL process is successfully finished, it's time to process the data model in SSAS. Once it is processed, users automatically can see refreshed data in Power BI Report Service.

How to organize this architecture:
  1. Set up ETL process with necessary jobs and notifications. For each both fact and dimensional tables there are separate 3 stored procedures - Extract, Transform and Load
  2. Upload PBI Desktop data model into SSAS Tabular. Here is the hint on how to connect the data model from PBI into SSAS. Then, import it into SSAS. You need to make it one time at the start. Afterward, you will modify and improve the data model according to user's requests via Visual Studio
  3. Once you have the data model in SSAS, you need to change the connection in the report from import to live (or from direct to live) 
  4. Set up On Premise Gateway for Analysis Services connection
Once these steps are done, download Visual Studio Community. This will be the main tool for developing new changes regarding data modeling, DAX, and granting access. In the case of Live Connection type, the Power BI Desktop file has no longer Power Query functionality. 

Pay attention: DAX is still might be created in the Power BI Desktop file. DAX also might be created in Visual Studio. The difference is that all DAX that you have created in Power BI Desktop remain on the report level. All DAX that you have created in Visual Studio in the project, you might use it easily for other new reports while connecting to this data model without recreating them once again. 

How to organize work in Visual Studio:
  1. Create a new project. To import existed one from the server, please select 'import', otherwise, if you want to create a new one, select 'Analysis Services Tabular Project'

  2. If you have a prod and dev server, select one of them. Later in the settings of the project, you can set up both of them (Project ➝ Database Properties)
  3. Set up Impersonate Account. Learn more
  4. Customize database deployments for multiple environments 

  5. Make necessary changes in the project: create new DAX and row filters, set up roles, add transformations in Power Query (Select Table ➝ Table Properties ➝ Design)
  6. *Might be optional: create a partition to boost the processing phase
  7. Build the solution 
  8. Deploy Solution on the selected Prod/Dev Environments. Pay attention to the 'Processing Option' setting in the environment. If you don't have to process every time data while deploying, I would recommend selecting 'Do not Process'. Thus, the process will run much faster. Learn more
  9. Commit the changes of 'model.bim' and related files of Tabular model in GIT
The positive result of transferring report from Import to Live connection (Tabular data model in SSAS):
  1. Boost the performance of the report 2x
  2. Use multiple environments to improve development workflow: instead of local testing in PBI Desktop, we created dev and prod environments 
  3. Find out a new way of optimization the refreshing of data sources - partitions
  4. Find out a new way of filtering data for customers according to row filters, which also boosts the time of the user's response

Comments

  1. Your blog had very good knowledge and that gave huge instructions and that was really commendable ideas. you have provided good knowledge on this topic please share more information with us.Russia Import Data

    ReplyDelete
  2. Great ideas you presented here. The concept taken here will be useful for my future programs and I will surely implement them in my study. With study I also provide consultancy for IT services for small startups. Technologies are changing day by day, and it is really tough to fulfill every IT need of businesses. The kind of services a friend of mine wanted I was not very confident about he took from managed IT services in Brisbane.
    Thank you so much for sharing this worthy content with us. Keep blogging article like this.

    ReplyDelete
  3. Thank you so much it is actually a very nice blog written to provide adequate information about Power BI and its related aspects.


    Powerbi Read Rest

    ReplyDelete
  4. Power BI templates free download I have read all the comments and suggestions posted by the visitors for this article are very fine,We will wait for your next article so only.Thanks!

    ReplyDelete
  5. When we find issues related to this type of subject that's not easy to find but some people like you make it easy for us. Thanks for giving us precious time. IT companies in Auckland NZ

    ReplyDelete
  6. Power BI Visuals Thanks for a very interesting blog. What else may I get that kind of info written in such a perfect approach? I’ve a undertaking that I am simply now operating on, and I have been at the look out for such info.

    ReplyDelete
  7. Good job, the information which you have provided is excellent and essential for everyone. Please always keep sharing this kind of information. Thank you. Best IT company in india

    ReplyDelete
  8. Nice info, I am very thankful to you that you have shared this special information with us. I got some different kind of knowledge from your web page, and it is really helpful for everyone. Thanks for share it. outsource social media marketing dubai

    ReplyDelete
  9. Business intelligence (BI) is a technology-driven process for analyzing data and delivering actionable information that helps executives, managers and workers make informed business decisions. As part of the BI process, organizations collect data from internal IT systems and external sources, prepare it for analysis, run queries against the data and create data visualizations, BI dashboards and reports to make the analytics results available to business users for operational decision-making and strategic planning.https://www.inetsoft.com/

    ReplyDelete
  10. Your blog contains lots of valuable data. It is a factual and beneficial article for us.IT Support Company Thankful to you for sharing an article like this.

    ReplyDelete
  11. Is this a paid topic or do you change it yourself?
    However, stopping by with great quality writing, it's hard to see any good blog today.

    Active Data Studio Crack
    Clip Studio Paint EX Crack

    ReplyDelete
  12. The Most Iconic Video Slots On The Planet - Jancasino
    The most iconic video ventureberg.com/ slot is the 7,800-calibre slot machine goyangfc.com called Sweet https://octcasino.com/ Bonanza. This slot machine was developed in 2011, septcasino.com developed in the same jancasino studio by

    ReplyDelete
  13. Writing a post is really important for the growth of your websites. Thanks for sharing amazing tips about service management reports. Following these steps will transform the standard of your post for sure.

    ReplyDelete
  14. Comparta gran información sobre su blog, Blog realmente útil para nosotros. Comprar Dutasterida

    ReplyDelete
  15. I accept it's staggeringly great how very much regarded all that you said in your post is. About Software-Defined Wide Area Network you are very learned on this. Proceed with your astonishing work.

    ReplyDelete
  16. I am definitely enjoying your website. You definitely have some great insight .Thank you so much it is actually a very nice blog written to provide adequate information about Power BI and its related aspects. erp customization examples

    ReplyDelete

Post a Comment

Popular posts from this blog

Top the fastest growing companies in the United States

Hi there, I was lucky to work with  such BI tool as Tableau for some time and here I would like to share with you my experience in Tableau features and data preparation. Here is presented comparison analytics by US states. DataSource The first data set I took from Tableau Sample Data Sets . My datasource contains some data by top fastest growing private companies in the United States: revenue, number of  workers, info by location and so on.  The larger amount of data, the more you can make various analysis of data set. I was wondering about: Where are the most successfull companies accumulated? How much is dispersion between states in a matter of number of employees and profit among states? Which industries are most developed in different states? 'How to use' and Description of Dashboard Box plot allows to see the median and outlier or in other words who is the outsider or leader in terms of profitability by states. To see which industries have succe

Transforming data into action in Healthcare sector

Transforming data into action allows to save the lives of people. Occasionally a simple report that you can do by a couple of hours can become a powerfull tool for raising important problems and determining the course of action. So it happened with the malaria's data by Zambia. I can not turn a blind eye to the world's problem (especially when it's related to the life of children) so I've decided to create a report. The more we talk about it, the more chance to draw attention to this problem - there is more chance to save children's lives and hope for the future.  Data analysis is a sort of journalistic investigation in the course of which you can find a lot of interesting facts. This topic is not an exception and that's what I've find out: Eight visionary companies created a stack of technology solutions that allowed health workers  quickly access reliable data and make informed decisions  Since 2014 malaria starts rapidly decrease aft