Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Current QTD, Previous QTD Expand / Collapse
Author
Message
Posted Thursday, July 1, 2010 12:11 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Monday, June 6, 2011 5:02 PM
Points: 4, Visits: 19
Hi Experts,

I have a detailed date dim table trying to figure out a way to create a column that indicates 'Calendar Type' (i.e. determines whether the period [e.g. 200912, 201001 etc] is the current QTD or previous QTD)

e.g. for the current month of July 2010

20104 - previous QTD
20105 - previous QTD
20106 - previous QTD

20107 - current QTD
20108 - current QTD
20109 - current QTD

thanks for your help in advance


I have these in the view already.


Current MAT 201001
Current YTD 201001
Month 201001
Current MAT 201002
Current YTD 201002
Month 201002
Previous Month 201002
Current MAT 201003
Current Month 201003
Current YTD 201003
Month 201003
Month 201004
Month 201005
Month 201006
Month 201007
Month 201008
Month 201009
Month 201010
Month 201011
Month 201012
Post #945940
Posted Thursday, July 1, 2010 4:02 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: Monday, August 18, 2014 8:36 AM
Points: 2,836, Visits: 5,066
jay83091 (7/1/2010)

...
e.g. for the current month of July 2010

20104 - previous QTD
20105 - previous QTD
20106 - previous QTD

20107 - current QTD
20108 - current QTD
20109 - current QTD

thanks for your help in advance


I have these in the view already.

Current MAT 201001
Current YTD 201001
Month 201001
Current MAT 201002
Current YTD 201002
Month 201002
Previous Month 201002
Current MAT 201003
Current Month 201003
Current YTD 201003
Month 201003
Month 201004
Month 201005
Month 201006
Month 201007
Month 201008
Month 201009
Month 201010
Month 201011
Month 201012


Sorry, but it is very unclear what you really want
In a sample you gave how would you mark 201003? Pre-previous?
what about 201010? Future QTD?
Then looking into your view, I can see that the same month (201002) is taken as Current MAT, Current YTD, Month and as Previous Month
What do you really want. Please click the link in my signature to present your question in a bit more helpfull way.


_____________________________________________
"The only true wisdom is in knowing you know nothing"
"O skol'ko nam otkrytiy chudnyh prevnosit microsofta duh!"
(So many miracle inventions provided by MS to us...)

How to post your question to get the best and quick help
Post #946034
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse