Matrix visual takes 40 seconds to render on a model with only 2 million rows Performance
Sales matrix, product hierarchy on rows, months across columns, four measures. Two million rows in the fact table, which I thought was nothing. It takes 35-45 seconds every time a slicer changes. Other visuals on the same page are under a second. No calculated columns and the file is 180MB.
@tabula_rasa_dev · last mo. · 3 replies
Row count is almost never the problem at that size. Two things to check before anything else.
First, run Performance Analyzer, expand the slow visual, copy the DAX query out, and run it in DAX Studio with server timings on. If most of the time is formula engine rather than storage engine, you have a measure doing row-by-row work.
Second, look for
FILTER(BigTable, ...)inside your CALCULATE calls. That materialises the whole table. Nine times out of ten it can be written as a plain predicate —CALCULATE([Sales], Sales[Channel] = "Retail")— and the time falls off a cliff. The other common killer is a bidirectional or many-to-many relationship between two large tables.Reply
Report
@iron_camber · last mo.
Formula engine was 91% of the time. Two of the four measures had FILTER over the fact table because I copied the pattern from a blog post years ago. Rewrote both, now 4 seconds.
Reply
Report
@csv_apologist · last mo.
Four seconds is still slow for that shape. Worth carrying on down the list — the matrix cell count is probably doing the rest.
Reply
Report