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

How can I sum these values to only show total YTD during selected period until today´s date? Expand / Collapse
Author
Message
Posted Monday, April 22, 2013 8:31 AM
Forum Newbie

Forum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum NewbieForum Newbie

Group: General Forum Members
Last Login: Tuesday, June 4, 2013 5:12 AM
Points: 6, Visits: 71
with member Measures.Today as vba!dateadd("yyyy", -1, vba!Now())
member Measures.FirstDayOfCurrentMonth as
cdate(cstr(vba!Month(vba!dateadd("yyyy", -1,vba!Now())))
+"-01-"+Cstr(vba!Year(vba!dateadd("yyyy", -1, vba!Now()))))

member [Measures].[YTD] as
YTD([Dim Time].[Date].&[2010-04-15T00:00:00])

select [Measures].[Belopp] on columns,
non empty [Dim Time].[Hierarchy].[Date].members
having [Dim Time].[Hierarchy].membervalue <= Measures.Today
and [Dim Time].[Hierarchy].membervalue >= Measures.FirstDayOfCurrentMonth
on 1



  Post Attachments 
resultYTD.PNG (42 views, 14.48 KB)
Post #1445009
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse