I have calculated field (Quantity*Rate). I dont see any difference whether I declare this object as Dimension or as a Measure when I pull that object in my report along with few of the Dimensions.
Why do we need to declare the calculated objects as Measure. Why cant we declare it as a Dimension.
There are situations where you want to declare a number datatype as a dimension and also as a measure. Here are two scenarios to explain:
As a measure - If you want to report at a summary level, by putting sum on the object it will roll it up to the level required. This is ideal if you are looking to bring back a single row per instance of an object
As a dimension - If you want to bring back every row and not have the data summarised, then a dimension is useful. This can also be achieved by making it a measure without a sum clause, but by specifying dimenson you can do more in the report with it like merging it to another dimension in a different data provider.
I guess the best way to look at it is to ask yooourself whether you want to maniuplate the object as a number with funcitns like sum, avg etc… or if you want it behave like a dimension.
Sorry, I misunderstood, you are creating the measure, it is not a pre-calc singular field in the DB.
This would have been bad design, but it can happen… 8) .
Yours looks like a line by line example, i.e. it could be like number of hours worked - Hours*Rate, for example, an invoice.
You should declare it as a measure if it makes sense when aggregated, with the dimensions, look at Damocles final example for one that, IMO, doesn’t.
An example, that I stated, that doesn’t is Item price, what would this mean aggregated, you could say it was a detail of the item?
If it was shoe colour and the report was for the manager of the shoe shop and he wanted to see what the total value of shoes was per colour regardless of size that would be an excellent way of doing things. Excellent.