Published on InterSystems Developer Community (https://community.intersystems.com)

Home > Does %TIMERANGE MDX extended function create a set of members or a single member?

Question
Lee Cascio · Jan 5, 2021

Does %TIMERANGE MDX extended function create a set of members or a single member?

The documentation says that the MDX extended function %TIMERANGE returns a member.

However it seems like it produces a set of time members from the description ("a range of members").  Perhaps behind the scenes it is making a calculated member?  I am able to plug the return "value" from %TIMERANGE into the SUM function, which takes a set as an argument, and I get a correct answer.  So SUM((%TIMERANGE(...)) works, however COUNT(%TIMERANGE(...)) does not work and returns a cryptic error:

Should we be able to use %TIMERANGE as a set argument to any mdx function that takes a set argument?

#InterSystems IRIS BI (DeepSee)
Product version: IRIS 2020.1

Source URL:https://community.intersystems.com/post/does-timerange-mdx-extended-function-create-set-members-or-single-member