Forum Discussion

almagp's avatar
almagp
New Member
7 months ago
Solved

Critical Matrix Performance (230s+): Optimization tips and technical documentation?

Hi everyone, I am currently optimizing a report and have encountered a critical performance issue with a couple of Matrix visuals. According to the Performance Analyzer, a single matrix is taking ov...
  • v-echaithra's avatar
    7 months ago

    Hi almagp ,

    Yes, adding shipment triggers complex internal DAX, even if no measures or calculated columns are visible. A Matrix evaluates data per cell (Row × Column × Hierarchy × Totals). Shipment is typically high-cardinality, so adding it multiplies the number of evaluation contexts, forces Power BI to resolve relationships, grouping, and totals at shipment grain. This results in very large internal DAX queries and storage engine scans, which explains the 230s runtime.
    Avoid placing fact-table IDs (Shipment) on Matrix rows.
    Use pre-aggregated dimensions, separate detail/drillthrough pages or summarized tables for detail views.

    Measures not used in the Matrix are NOT calculated. Matrix slowness is almost always due to model design + cardinality, not whether measures are visible. Calculated columns are evaluated if they belong to tables used in rows/columns or relationships. Matrix performance cost grows as Rows × Columns × Hierarchies, even without visible measures.
    High load times in a “simple” Matrix are usually caused by:

    High-cardinality fields (IDs like Shipment) on rows/columns > cell explosion
    Calculated columns on fact tables
    Totals / subtotals
    Relationship complexity
    Conditional formatting or tooltips invoking additional measures

     

    No, splitting models just to isolate measures is NOT best practice.
    Recommended approach is to keep one shared semantic model, move heavy row-level logic to Power Query / ETL, avoid calculated columns on fact tables, use display folders / perspectives to manage complexity
    Splitting into “lean + heavy” models increases duplication and maintenance without guaranteed performance gains.

    Documentations:

    Optimization guide for Power BI - Power BI | Microsoft Learn
    Automatic tuning - SQL Server | Microsoft Learn

    Hope this helps.
    Thank you.