Partitioning dataset and Refreshing power BI

Amir_m 0 Reputation points
2024-02-20T23:05:47.67+00:00

Hello, We had a dataset with 5 years data, then reduced the size to only 30 months data to improve performance. Now we want to automate Power BI refresh but getting an error: "This operation was canceled because there wasn't enough memory to finish running it." We have over 25 tables but only 2 of them are big in size (one with 10M rows and the other with 7M rows). I used Tabular editor for partitioning those 2 large tables with 1 year incremental period and 3 years RollingWindowPeriods (4 partitions in total, one for each year). Then, I tried refreshing each partition using PowerShell in Azure Runbooks. Part of the script is as follow: $Query ="{ ""refresh"": { ""type"": ""full"", ""objects"": [ { ""database"": ""Dataset_1"", ""table"": ""Orders"", ""partition"": ""2023"" } ] } }" However, when I refresh each partition, I still get memory capacity error. I changed partitioning from 1 year to monthly (30 partitions, each 1-month period) and I could refresh each partition separately. But it doesn't make sense because each partition (1 month) would take between 2 - 6 minutes to refresh and each monthly partition is only around 300,000 rows. *** I created a dataset spanning 12 months, which includes all tables without partitioning. The dataset refreshes successfully within 3 minutes without any errors, despite the fact that the largest table in the 12-month dataset contains around 3.5 million rows. But, when using yearly partitioning, I face a memory error in just one partition and for only one table. I don't know where I am going wrong. I really appreciate your ideas and comments on this.

SQL Server Analysis Services
SQL Server Analysis Services
A Microsoft online analytical data engine used in decision support and business analytics, providing the analytical data for business reports and client applications such as Power BI, Excel, Reporting Services reports, and other data visualization tools.
1,244 questions
PowerShell
PowerShell
A family of Microsoft task automation and configuration management frameworks consisting of a command-line shell and associated scripting language.
2,064 questions
{count} votes

1 answer

Sort by: Most helpful
  1. Lucas Sousa da Silva 75 Reputation points
    2024-02-20T23:51:22.27+00:00

    Check Memory Usage: Ensure that your environment has enough memory available to handle the refresh process, especially when dealing with large tables and partitions. You may need to allocate more memory or optimize the memory usage in your Power BI setup. Optimize Partitioning Strategy: Instead of monthly or yearly partitions, consider using a hybrid approach. For example, you could have quarterly partitions for the large tables and monthly partitions for smaller tables. This way, you balance the refresh performance and memory usage. Incremental Refresh: If your data allows it, consider using incremental refresh to load only the new or changed data into the dataset. This can significantly reduce the amount of data that needs to be refreshed, improving performance and reducing memory requirements. Check for Bottlenecks: Identify any potential bottlenecks in your refresh process, such as complex transformations or calculations, and try to optimize them to reduce memory usage. Error Handling: Implement robust error handling in your PowerShell script to handle memory capacity errors gracefully, such as retrying the refresh or logging the error for further investigation. Check for Updates: Ensure that you are using the latest versions of Power BI, Tabular Editor, and any other related tools, as updates often include performance improvements and bug fixes. Consider Parallelism: If your environment supports it, consider running multiple refresh operations in parallel for different partitions or tables to distribute the workload and reduce the risk of memory capacity errors.

    By optimizing your partitioning strategy, memory usage, and error handling, you should be able to improve the performance and reliability of your Power BI refresh process.

    0 comments No comments