Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a concept such as GetDate in MDX

Status
Not open for further replies.

eo

MIS
Apr 3, 2003
809
I have a query
Code:
select [Measures].[GrsIncLR%] on 0
from PremiumsAndClaims
WHERE [Date Transaction].[Date Transaction].[YearNo].&[2007];
But want to auto the output from 2007 to the current year, any idea if this is possible

EO
Hertfordshire, England
 
MDX Does not have a GetDate function, but you do have the ability to invoke some VBA Functions in MDX. I believe it is VBA!Now().

Paul
---------------------------------------
Shoot Me! Shoot Me NOW!!!
- Daffy Duck
 
I would use the
WITH
MEMBER [Date Transaction].[Date Transaction].[CurrentYear] as 'Tail([Date Transaction].[Date Transaction].[YearNo].Members).Item(0).Item(0)'
SELECT [Measures].[GrsIncLR%] on 0
from PremiumsAndClaims
WHERE [Date Transaction].[Date Transaction].[CurrentYear];
 
Also, you may need to filter the Years so that only Years with data are returned.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top