dbTalk Databases Forums  

Date-based calculated sets

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


Discuss Date-based calculated sets in the microsoft.public.sqlserver.olap forum.



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

Default Date-based calculated sets - 05-20-2005 , 08:09 PM






I want to allow users to quickly see data on this month (i.e. month to date)
or last month, this quarter or last quarter. I don't think I need to enable
comparison between date periods.

I was thinking of adding Calculated Sets called "This Month", "Last Month",
"This Quarter" and "Last Quarter" to my Date dimension. What's the best way
to do this?

Thanks.

Reply With Quote
  #2  
Old   
Jéjé
 
Posts: n/a

Default Re: Date-based calculated sets - 05-21-2005 , 08:40 AM






you can create a "dummy dimension" called "Relative time" with only 1 row on
it
like this:

RelativeTimeID Label
1 Standard

add this dimension in your cube (you have to create a dummy column in your
fact table which is allways "1" to insure that you can link the table to the
new dimension)

Now you can create calculated members in the cube and add these members to
the "Relative time" dimension.

Like:
"Year to date"
which is:
SUM( YTD(), ([Relative time].&[1]) )

sample here:
http://www.tomchester.net/articlesdo...dimension.html
and here
http://support.microsoft.com/default...;EN-US;q304118

good luck

"Jeff Davis" <Jeff Davis (AT) discussions (DOT) microsoft.com> wrote

Quote:
I want to allow users to quickly see data on this month (i.e. month to
date)
or last month, this quarter or last quarter. I don't think I need to
enable
comparison between date periods.

I was thinking of adding Calculated Sets called "This Month", "Last
Month",
"This Quarter" and "Last Quarter" to my Date dimension. What's the best
way
to do this?

Thanks.



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.