Grain (OLAP)

Grain (OLAP)

Overview

In SQL Server Analysis Services (SSAS), the grain or granularity of a fact defines the level of detail recorded in the fact; it is determined by the dimension keys of the fact. If a fact references the key attribute of a dimension, then it records data at the most descriptive level of detail possible for that dimension; if it references other attributes of the dimension, then the fact may be stored at a less descriptive, aggregate level of detail. For example, if a time dimension has Date as its key attribute then facts that reference the Date attribute store their data at the granularity of a single date. If the dimension also contains a Month attribute, and facts reference the Month instead, then the granularity of the fact is month, and the measures of the fact will contain values that are aggregated by month.

Granularity also applies to queries in Analysis Services. The grain of a query describes the level of detail requested by the query. The grain of a query can be different from the grain of the facts in the Analysis Services database. For example, a database might store facts at the level of Date, but a query can request data at the level of Month instead. Analysis Services will aggregate lower level facts to produce a record at the higher level requested by the query.


Other Languages

This article is also available in the following languages:

Brazilian Portuguese (pt-BR)

Leave a Comment
  • Please add 2 and 1 and type the answer here:
  • Post
Wiki - Revision Comment List(Revision Comment)
Sort by: Published Date | Most Recent | Most Useful
Comments
  • Richard Mueller edited Revision 5. Comment: Removed (en-US) from title

  • Matt Burr MSFT edited Original. Comment: Small corrections and edits.

Page 1 of 1 (2 items)
Wikis - Comment List
Sort by: Published Date | Most Recent | Most Useful
Posting comments is temporarily disabled until 10:00am PST on Saturday, December 14th. Thank you for your patience.
Comments
  • Matt Burr MSFT edited Original. Comment: Small corrections and edits.

  • Richard Mueller edited Revision 5. Comment: Removed (en-US) from title

Page 1 of 1 (2 items)