O'Reilly logo

MDX with Microsoft SQL Server 2008 R2 Analysis Services: Cookbook by Tomislav Piasevoli

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Implementing the Tally table utility dimension

The Tally table, also known as the Number table, is a single-column table filled with natural numbers, numbers starting with 1 and ending with a number equal to the number of rows in that table. The Tally table can also start with 0 if the circumstances require so.

Having a collection of numbers, often up to a very large number, is just one aspect of the Tally table. The other, more important aspect is that the numbers form a sequence. Having a sequence of numbers in a table enables set-based operations because such a table can be used instead of much slower iterations using loops and navigation using ranks. That's the reason why many relational databases incorporate the Tally table.

SQL Server Analysis ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required