Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

If I have a table such as...:

YYMM | Sales
1201 | 10
1202 | 20
1203 | 30
1204 | 40

... then I might describe this as having a time dimension. If I wanted to calculate a year-to-date value of Sales, would "year to date" be a different dimension to time, or is it actually the same and the additional measure implies the different meaning? Such as:

YYMM | Sales | SalesYTD
1201 | 10    | 10
1202 | 20    | 30
1203 | 30    | 60    
1204 | 40    | 100
share|improve this question

Year to date sales is a different measure. Depending on your platform (OLAP systems, for example) it may be purely calculated on the fly. If you have an appropriate unit of analysis to do so, store it, otherwise calculate it on the fly.

share|improve this answer
May I ask what you mean by an appropriate unit of analysis? I think you mean something like "an appropriately grained dimension". Is that right? – jl6 Apr 25 '12 at 9:53
Combination of dimensions (e.g. product, sales agent ...) and a rollup of time. What you calculate must be additive across anything you want to slice it by, so you can't have multiple incremental YTD figures for the same thing appearing in the slice. – ConcernedOfTunbridgeWells Apr 25 '12 at 10:04

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.