dbTalk Databases Forums  

Time Dimesion and MDX

microsoft.public.sqlserver.olap microsoft.public.sqlserver.olap


Discuss Time Dimesion and MDX in the microsoft.public.sqlserver.olap forum.



Reply
 
Thread Tools Display Modes
  #1  
Old   
Manuel
 
Posts: n/a

Default Time Dimesion and MDX - 09-27-2005 , 10:44 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
Quote:
-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



Reply With Quote
  #2  
Old   
Darren Gosbell
 
Posts: n/a

Default Re: Time Dimesion and MDX - 09-27-2005 , 11:33 PM






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_dot_com>
Blog: http://www.geekswithblogs.net/darrengosbell

Reply With Quote
Reply




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Powered by vBulletin Version 3.5.3
Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.