UlrichWuenstel
UlrichWuenstel

Reputation: 470

icCube - removing date range through a Perspective

I would like to build a Perspective, where all days older than 3 months are removed. In MDX the following would work:

filter([date].[date].[day].members, [date].[date].CurrentMember.properties('KEY',TYPED) <= today()->minusMonths(3))

But in the Perspective the function minusMonth() is apparently not known:

Perspective 'Perspective1 ': operator '>' syntax error (left-operand:'date' (right-operand:'empty')

Is there a different way to achieve this?

Upvotes: 2

Views: 46

Answers (1)

Marc Polizzi
Marc Polizzi

Reputation: 9375

The error message has been improved/fixed. Actually the error is because a date member has no key (e.g., the optional member used to map unresolved rows) and then

null <= today()

is generating the error. To fix it, you need to check first for that member in the filtering expression.

Hope that helps.

Upvotes: 1

Related Questions