Home > Archive > MS SQL Server OLAP > September 2005 > Time Dimesion and MDX









You are viewing an archived Text-only version of the thread. To view this thread in it's original format and/or if you want to reply to this thread please [click here]

 

Author Time Dimesion and MDX
Manuel

2005-09-27, 11:24 am

I'm starting using AS and I have many troubles in non-basic
configuration of my cubes.
I'm able to build cubes with dimension and measures, working with basic
calculated members but...

Now I want to calculate the throughput-out of a warehouse as

(number of units out per days) / (number of days)

basically a mean value of unit out basing on time

my fact table [movement_out] as
[units, id_date]

my dim table [date_out] as
[id, date, month, year]

and the obvious dimension

date_out
|-year
|-month
|-date

I know that i can make a calculated member 'day count' of the number of
days as

IFF([date_out].CurrentMember.Level.Name = 'date',
1,
Sum([date_out].CurrentMember.Children, [day count]))

but if I dont' have one movement out per day the mean value is not
correct because the number of day is not correct.
Any one can help me ASAP?

I'm newbie... so be patient

Darren Gosbell

2005-09-28, 3:24 am

Assuming that your time dimension has all the days in it, but only some
of them have data against them you should be able to do the following

Measures.[number of units out per days] / COUNT(descendants
(Time.CurrentMember,[Time].[days]))

This will divide the aggregate units out per day by a count of the
'days' level members below the current time member. So this should work
at the year and month level.

--
Regards
Darren Gosbell [MCSD]
< dgosbell_at_yahoo_do
t_com>
Blog: http://www.geekswithblogs.net/darrengosbell
Sponsored Links





Also available: Server administration forum archive | Web Design forum archive | Software forum archive | Hardware reviews archive | Programming forum archive

Copyright 2008 droptable.com