dbTalk Databases Forums  

Simple Situation But Can't Find Solution!

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


Discuss Simple Situation But Can't Find Solution! in the microsoft.public.sqlserver.olap forum.



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

Default Simple Situation But Can't Find Solution! - 12-05-2005 , 11:04 AM






My data is on Tennancies, see below:

Tennant Code, Start Date, End Date

I wish to have a Report like below:

Month Num of Tennancies

Jan 05 120
Feb 05 130

etc.

How can I count the number of tennancies in a particular month? Do I
need a custom rollup formula for this? How do I design the dimensions?

Any help much appreciate. It seems like such a simple problem, but I'm
finding it very difficult.


Reply With Quote
  #2  
Old   
jason.saldo@gmail.com
 
Posts: n/a

Default Re: Simple Situation But Can't Find Solution! - 12-05-2005 , 10:04 PM






This might be easier with a SQL ETL and a month table to create a table
to report off of.
Keep in mind this is a rough draft.
The month table would be preloaded with the months you want to report
off of.

Create table rentalMonths as
(
monthID int identity, --check this syntax
rentalMonth int,
rentalYear int
)
insert into rentalMonths (rentalMonth, rentalYear)
select 1,2005
insert into rentalMonths (rentalMonth, rentalYear)
select 2,2005

Create a aggregate table
create table rentalTennancies as
(month int, year int, tennancies int)

Use your month's table and a correlated subquery to get your results.
If you share your schema I can help with query

Hope this helps.


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.