Every semantic model consumes memory, and the more data it contains, the more memory it requires. When that memory is exhausted, refreshes fail, queries time out, and capacity consumption increases.
Organizations are then left with two options: reduce the size of the model or purchase additional capacity. Optimization is usually the better choice because it also gives you faster refreshes and better performance from Copilot, data agents, and DAX queries.
Why memory optimization matters
Keeping your model size under control pays off in three ways:
- Lower cost: Smaller models reduce the need for higher Fabric SKUs or license upgrades.
- Faster refreshes: Less data and better compression mean shorter refresh times.
- Better performance: Copilot, data agents, and DAX queries run more efficiently.
How memory behaves
Memory is a hard limit. Compute can stretch to handle a spike, but memory can’t. Each semantic model has its own ceiling, so if one goes over, only that model fails.
Refreshes need extra room. This is the most overlooked part. In Import mode a full refresh works like this:
- The current model stays in memory.
- A new copy is processed in parallel.
- This adds processing and query memory overhead.
A model that fits at rest can still fail during a refresh. Always plan for the extra headroom, not just the final size.
File size isn’t memory size.
- Memory: compressed VertiPaq data loaded into RAM.
- PBIX size: the compressed file on disk, plus metadata.
A small file can still be a memory-hungry model.
Storage modes redistribute the problem rather than remove it.
- Import: strong performance, predictable memory use.
- Direct Lake: loads data on demand, but still uses memory when queries run.
- DirectQuery: minimal memory, but slower queries and more load on the source.
Measure before you optimize
Before making any changes you need clear visibility into the system. To achieve that, you can use tools such as:
- VertiPaq Analyzer (Tabular Editor 3, DAX Studio)
- Memory Analyzer (Fabric notebook)
They allow you to identify exactly which columns consume the most memory and this is how you move from:
“My model is too big” to “This specific column is the problem.”
Six patterns to optimize model size
These six patterns range from removing unused data to more advanced compression and aggregation strategies.
1. Remove what you don’t need
This is the simplest and most effective step. The goal is to include only what you need:
- Remove unused columns and tables
- Limit the amount of historical data retained
- Aggregate older data rather than storing every detail.
Including data “just in case” carries a genuine cost. If a column does not support a clear reporting requirement, it likely does not belong in the model. The Best Practice Analyzer in Tabular Editor includes a rule that identifies columns not used in calculations or relationships.
2. Reduce Cardinality
When a large column is essential, the next step is to make it lighter.
VertiPaq stores a dictionary of unique values for each column, so greater uniqueness results in greater memory consumption.
Common solutions include:
- Splitting DateTime columns into separate Date and Time columns.
- Rounding decimal values to reduce precision.
- Avoiding floating-point types (Double, Single, Float) where exact precision is required.
- Avoiding the storage of numeric values as text.
Whereas removing columns eliminates entire structures, reducing cardinality shrinks those that must remain.
3. Use user-defined aggregations
Sometimes you can’t remove high-cardinality detail columns. In that case, user-defined aggregations provide an effective alternative.
This approach splits your data into two layers:
- Aggregated layer: fast and in memory.
- Detail layer: in DirectQuery so it uses no VertiPaq memory.
Most queries use the aggregated layer, and only deep drillthrough queries go to the source, with a small performance cost. The detail table stays part of the model, but unlike imported data, it doesn’t consume VertiPaq memory.
The result:
- Significant memory reduction
- A slight trade-off in query performance for detailed views
This works best when:
- 80 to 90% of your reports use aggregated data.
- Row-level detail is only needed occasionally and is usually heavily filtered.
- High-cardinality columns are what drive the model size.
4. Disable Unused Attribute Hierarchies
Power BI automatically creates an attribute hierarchy for every column to support MDX queries, such as those generated by Excel PivotTables. Most of these hierarchies are never used, yet they continue to occupy memory.
Setting the IsAvailableInMDX property to False reclaims that space, avoids unnecessarily wide result sets, and prevents high-cardinality columns from being used in PivotTables.
The column remains fully available in DAX and in reports but it simply stops generating unnecessary metadata.
5. Split Large Models into Smaller Ones
Rather than maintaining a single large model consider building several smaller models organized by subject area, each containing only the tables and columns required for its scope.
Because memory limits apply per model, this approach reduces peak consumption and simplifies governance and maintenance.
There are, however, trade-offs:
- A report can connect to only one model.
- Cross-domain analysis becomes more difficult.
This strategy is most appropriate where business areas are clearly distinct and rarely need to be combined.
6.Take Advantage of Run-Length Encoding (RLE)
Run-Length Encoding (RLE) is a compression technique used by VertiPaq.
VertiPaq compresses better when identical values are stored consecutively. Sorting or partitioning your data can improve this without changing the data itself and in some cases the model shrinks by double-digit percentages.
This pattern is worth considering when:
- Large fact tables are the primary driver of memory consumption
- Other column-level optimizations have already been implemented
- The model can’t be further divided into smaller parts
- You need to improve performance without altering the underlying business logic
Final thoughts
Semantic model memory is a hard limit in Fabric, and a refresh requires additional headroom beyond the size of the model at rest.
The recommended approach is to begin with measurement, using VertiPaq Analyzer and then apply the techniques in order, from the simplest to the most advanced. Removing unused data and reducing cardinality typically deliver the greatest gains for the least effort.
By combining solid fundamentals with targeted optimizations, organizations can:
- Remain within memory limits
- Improve performance
- Reduce costs
- Build semantic models that are scalable and reliable