Skip to main content

Command Palette

Search for a command to run...

What is a dense measure? and why you should avoid it.

Published
1 min read
What is a dense measure? and why you should avoid it.
I
Azure Cloud Data & AI Solution Engineer specializing in Microsoft Fabric, Power BI, data architecture, governance, and modern data platforms.

There’s not enough memory to complete this operation.

There’s not enough memory to complete this operation.

Examples of dense measures:

[measure] = 1 [measure] = COUNT('Sales'[ProductKey]) + 0 [measure] = If([Total Sales] <> 0, [Gross Margin] / [Total Sales], 0)

Power BI queries assume dimension modeling: dimension columns from different tables added to a visual form a cross join space in which measures are evaluated.

In other words, the presence of relationships to connect all the tables together is ignored when query space is formed.

A measure is sparse when its values are mostly blanks. It is dense when it has non-blank values in most of the cross join space.

For example, if you add product, customer, date columns and total sales measure to a visual. The measure is sparse as only a small fraction of combinations of product, customer, and date have sales, hence return non-blank values.

But a measure that returns constant 0 is dense because it returns non-blank value 0 in the entire query space of the cross join of the three columns.

- Jeffrey Wang