Dimension elements that include others -
11-03-2006
, 04:25 AM
Do you have an idea how to solve this one:
I have a dimension that contains the days it took between Order and
Shipping. The key to the dimension is simply an int with the days, the name
is a computed column that makes it look a bit nicer, like "less than 1 day",
"less than 2 days" and so on.
Works well, every Order is assigned to its slot on this dimension. The user
finds 500 Orders done in "1 day", and 600 done in "2 days". He would like to
see them as 500 in the "1 day" dimension entry but 1100 at the "2 days"
entry. Of course, an order that was completed in 1 day does in some way fill
the requirement of being "quicker than 2 as well"
Maybe this should resolved on the client side, but I wonder if there is
anything I can do in MDX to get this result.
I need something like: "The value for this field is what was assigned to it
directly and all that was assigned to previous entries when looking at this
particular dimension".
Sounds like the usual "employee self-referencing" hierarchie dimensions in
some way. If I would make this a self referencing dimension where there is
only one entry on each level that contains all the shorter time spans it
might actually work, but I do not want the user to have to go down the
ladder from "year", "6 months", "3 months" and so on until he finally
reaches the "1 day" on the deepest level.
As an added difficulty, the measure that is in "split apart" by the
dimension might be a count, in which case it would be correct to simply add
up the previous elements.
But the measure might also be an average of a price or something, in which
case adding would be wrong. What really should happen is that each dimension
element "contains" all of the fact rows in its range and all of the rows of
the lower dimension members before it, and the calculation of the measure
happens as it always does on this heap of rows.
I hope I was able to explain what I mean to say, excuses if the English is
too bad to understand...
Thanks!
Ralf |