Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2005 Forums
 Analysis Server and Reporting Services (2005)
 MAT Quater

Author  Topic 

Jothi
Starting Member

1 Post

Posted - 2012-03-27 : 16:39:24
Hi ,

I want to create a column MAT Qtr to use it as attribute in cube. please let me know how to achieve it at database instead of mdx

PeriodKey Period
1 QTR_03_2005
2 QTR_03_2006
3 QTR_03_2007
4 QTR_03_2008
5 QTR_03_2009
6 QTR_03_2010
7 QTR_03_2011
8 QTR_06_2004
9 QTR_06_2005
10 QTR_06_2006
11 QTR_06_2007
12 QTR_06_2008
13 QTR_06_2009
14 QTR_06_2010
15 QTR_06_2011
16 QTR_09_2004
17 QTR_09_2005
18 QTR_09_2006
19 QTR_09_2007
20 QTR_09_2008
21 QTR_09_2009
22 QTR_09_2010
23 QTR_09_2011
24 QTR_12_2004
25 QTR_12_2005
26 QTR_12_2006
27 QTR_12_2007
28 QTR_12_2008
29 QTR_12_2009
30 QTR_12_2010

visakh16
Very Important crosS Applying yaK Herder

52326 Posts

Posted - 2012-03-27 : 16:53:39
make use of calendar table like below

http://visakhm.blogspot.com/2010/02/generating-calendar-table.html

then use
DATENAME(qq,[date]) and datename(yy,[date]) etc for getting quarter, year parts

------------------------------------------------------------------------------------------------------
SQL Server MVP
http://visakhm.blogspot.com/

Go to Top of Page
   

- Advertisement -