DeepSee MDX Reference
%TIMERANGE
[Back] [Next]
   
Server:docs1
Instance:LATEST
User:UnknownUser
 
-
Go to:
Search:    

Enables you to define a range of time members, possibly open-ended. This function is a DeepSee extension to MDX.
Returned Type
This function returns a member.
Syntax and Details
%TIMERANGE(start_member,end_member,keyword)
Where:
You must specify start_member, end_member, or both.
Example
The following example uses both start_member and end_member:
SELECT NON EMPTY DateOfSale.YearSold.MEMBERS ON 1 FROM holefoods 
WHERE %TIMERANGE(DateOfSale.YearSold.&[2009],DateOfSale.YearSold.&[2011])
 
 
1 2009                                  179
2 2010                                  203
3 2011                                  224
The next example shows an open-ended range:
SELECT NON EMPTY DateOfSale.YearSold.MEMBERS ON 1 FROM holefoods 
WHERE %TIMERANGE(DateOfSale.YearSold.&[2009])
 
 
1 2009                                  179
2 2010                                  203
3 2011                                  224
4 2012                                  114
The next example shows another open-ended range, this time using the EXCLUSIVE keyword:
SELECT NON EMPTY DateOfSale.YearSold.MEMBERS ON 1 FROM holefoods 
WHERE %TIMERANGE(,DateOfSale.YearSold.&[2009],EXCLUSIVE)
 
 
1 2007                                  124
2 2008                                  156