RE: MDX Get most recent with time dimension
- From: Rich <Rich@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 4 Nov 2007 17:25:01 -0800
Thanks - I thought of this solution and it will work, its just not ideal
because we don't know the last entry until some time after the last entry is
added to the fact table - tracking is continuous in our application. This
means we need to run a batch process every so often to mark the last entry
with 1 so it can be counted in the cube.
I was just hoping there would be a more dynamic solution without having to
schedule a TSQL batch.
Does anyone know if a TOPCOUNT of 1 will work? Or if I get the MAX(time_id)
from my fact table?
Have a super evening!
Rich
"Rea" wrote:
Hey Rich.
The natural place for your task seems to be a calculated field
you would do, on your facts, prior to your olap cube.
I can't see a reasonable and efficient way MDX could handle this kind of
task (it will need to search online the whole cube for every customer..).
Instead, You would mark for each customer his last record
by writting 1 in some field.
Then in your cube do a simple measure that sums up these values.
Are there any reasons you are thinking of using MDX instead??
Hope this helps!
Rea
"Rich" wrote:
Good day all!
I have a simple tracking cube with one fact table and three dimensions:
Customer, Tracking, and Time (granular to the second).
I am trying to formulate an MDX query to return a count for Tracking
dropoffs - which would be the equivalent of the last entry for each Customer
in the fact table, or the maximum Time reached by each Customer in the fact
table.
I would like to show each non-empty Tracking member with a count of how many
Customers dropped off for that item.
I'm not sure how to approach this - any help would be appreciated. Thanks
and have a super weekend!
Cheers,
Rich
- Prev by Date: Dimension over 15 million rows in AS2005
- Next by Date: RE: Null values in all measures
- Previous by thread: Dimension over 15 million rows in AS2005
- Next by thread: Parent-child dimension
- Index(es):
Relevant Pages
|