docs.intersystems.com
InterSystems IRIS Data Platform 2019.2  /  InterSystems MDX Reference

InterSystems MDX Reference
CLOSINGPERIOD
Previous section           Next section
InterSystems: The power behind what matters   
Search:  


Returns the last descendent member of the given level, at the same level as the given member. This function is intended primarily for use with time levels.
Returned Type
This function returns a member.
Syntax and Details
CLOSINGPERIOD(ancestor_level,member_expression)
Where:
Given a level and a member, this function returns the last member that is a descendent of the given level and that is at the same level as member.
Example
The following query displays the closing quarter for the year that includes Q3 2003:
SELECT MEASURES.[%COUNT] ON 0, CLOSINGPERIOD (birthd.year,birthd.[Q3 2003]) ON 1 FROM patients
 
                             Patient Count
Q4 2003                                  40
In contrast, the following query displays the closing quarter for the decade that includes Q3 2003:
SELECT MEASURES.[%COUNT] ON 0, CLOSINGPERIOD (birthd.decade,birthd.[Q3 2003]) ON 1 FROM patients
 
                             Patient Count
Q4 2010                                  36
See Also


Previous section           Next section
Send us comments on this page
View this book as PDF   |  Download all PDFs
Copyright © 1997-2019 InterSystems Corporation, Cambridge, MA
Content Date/Time: 2019-08-22 06:48:58