Forum Discussion

PowerWhy's avatar
PowerWhy
Icon for Helper IV rankHelper IV
1 year ago

Caching visualisations for slow measures?

Hello,

 

Thinking outloud some of my visualisations take a long time to load due to slow mesaures. However writing code with measures is sometimes much simpler (and therefore has less business continuity risk) than other approaches such as pre-calculated calculated columns. So I was wondering if as a compromise it might be possible to stick with the slow measures but have power bi cache all the visualisations for all possible permutations of slicer / cross-filtering selections?

 

Has anyone heard of that being an option?

 

Thank you,

 

PW

2 Replies

  • Hello PowerWhy ,

     

    sometimes it's because you have too many objects and measure that it waits for each to load, so you need to check which is keeping the visuals from loading.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi PowerWhy 

     

    Caching all visualizations for every possible permutation of slicer and cross-filtering selections in Power BI isn't a built-in feature. However, there are some strategies you can consider to improve performance while maintaining the simplicity of using measures:

    1. Aggregations: Use aggregations to pre-calculate and store summary data. This can help speed up queries and reduce the load on your measures. You can also pre-aggregate the data at the data source, which can reduce the data loaded into Power BI. 
    2. Optimize DAX Measures: Review and optimize your DAX measures to ensure they are as efficient as possible. Sometimes, small changes in the DAX code can lead to significant performance improvements.

    3. Pre-Calculated Tables: While you mentioned the risk associated with pre-calculated columns, using pre-calculated tables for certain complex calculations can sometimes be a good compromise.
    4. Performance Analyzer: Use the Performance Analyzer tool in Power BI to identify which visuals and measures are causing the most delay and focus on optimizing those. 

    While these strategies don't directly cache all permutations, they can help improve the overall performance of your Power BI reports.

     

    Meanwhile, limiting the number of visuals and measures on a report page can indeed improve performance. Each visual on a report page generates its own query. Fewer visuals mean fewer queries, which can reduce the overall load on the dataset and improve performance. 

     

    In addition, Power BI does have some caching mechanisms to improve performance, but they are different from what you want. Here are some documentation if you would like to learn more:

    Query caching in Power BI Premium - Power BI | Microsoft Learn

    https://data-mozart.com/cache-me-if-you-can-understanding-different-cache-types-in-power-bi/

     

    Best Regards,
    Jing
    If this post helps, please Accept it as Solution to help other members find it. Appreciate your Kudos!