dbTalk Databases Forums  

Re: Calculate the amount of open issues.

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


Discuss Re: Calculate the amount of open issues. in the microsoft.public.sqlserver.olap forum.



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

Default Re: Calculate the amount of open issues. - 02-18-2005 , 01:24 PM






I suppose that you rollup CaseCount with Aggreagtion function of "count".

Quote:
1) how many cases were opended on a given time periode. So if I choose
05.Q1.Jan I will get 4 opened. If I choose 05.Q1.Jan.01 I will get 2 opened

CaseCount itself meets them.

Quote:
2) How many cases were closed, (like the above)

CaseCount itself meets them.

Quote:
3) How many cases are open at the end of the period. So if I choose
05.Q1.Jan I will get 0 opened. If I choose 05.Q1.Jan.05 I will get 3 open

Sum({Head(OpenDate.CurrentMember.Level.Members,0). Item(0):OpenDate.CurrentMe
mber.Lag(1)}, CaseCount)


Ohjoo Kwon
www.olapforum.com


"Henrik Hj?lund" <hjoellund (AT) mail (DOT) tele.dk> wrote

Quote:
Hi

I have a fact table with an open date and a closing date for a case. Like

Case # opendate closeddate
1 01-01-05 01-06-05
2 01-01-05 01-08-05
3 01-04-05 01-09-05
4 01-06-05 01-07-05

I have build 2 time dimensions (year, quarter, month, day) one based on
the
opendate and one on the closeddate.

So my question is how to write MDX that can give me the answer for
1) how many cases were opended on a given time periode. So if I
choose
05.Q1.Jan I will get 4 opened. If I choose 05.Q1.Jan.01 I will get
2
opened.
2) How many cases were closed, (like the above)
3) How many cases are open at the end of the period. So if I choose
05.Q1.Jan I will get 0 opened. If I choose 05.Q1.Jan.05 I will get
3
open

Thanks in advance.
-Henrik





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.