2

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

1 Answer 1

2

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.

2
  • 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, 2012 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. Apr 25, 2012 at 10:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

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