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

HELP in MDX... Expand / Collapse
Author
Message
Posted Wednesday, July 25, 2012 6:11 AM


SSC-Enthusiastic

SSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-EnthusiasticSSC-Enthusiastic

Group: General Forum Members
Last Login: 2 days ago @ 10:59 PM
Points: 112, Visits: 468
Hi,

I am creating a report in SSRS using MDX. In one of the Datasets I need to do something like below...My concern is only in the WHERE part.

Select rows on 0, columns on 1
from Cube
where [DATE].[YEAR].["+CSTR(YEAR(NOW()))+"]

But above is not correct. The point is that I need to filter data only for current year.
How to accomlish that...Please help.

Please note that below works and this is what I want dynamically.
Select rows on 0, columns on 1
from Cube
where [DATE].[YEAR].[2012]
Post #1335058
Posted Tuesday, August 7, 2012 2:32 AM


SSC Journeyman

SSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC JourneymanSSC Journeyman

Group: General Forum Members
Last Login: Monday, December 15, 2014 7:14 AM
Points: 87, Visits: 768
Try looking at the STRTOMEMBER function.

e.g.

STRTOMEMBER("[Date].[Calendar Year].&[" + CSTR(YEAR(NOW())) + "]")
Post #1341065
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse