COGNOiSe.com - The IBM Cognos Community

IBM Cognos Analytics Platform => Cognos Analytics => Framework Manager => Topic started by: Cognos91 on 12 Jul 2017 11:04:33 PM

Title: RESOLVED: DMR - Age Bucket Filters
Post by: Cognos91 on 12 Jul 2017 11:04:33 PM
I need to create an age bucket standalone filter for DMR model. The date field (Order Date) is an attribute of the dimension. It currently resides as an attribute (no role defined) of the lowest level of the hierarchy in the dimension.
The standalone age bucket requirement is 30/60/90, based on current date.
Logic = Order Date > Current Date and Order Date < (Current Date + 30).

Standalone filters are easily created in relational as logic is straightforward.
For DMR, I tried using the following:
filter(Order Date , _days_between ( Order Date ,current_date ) < 90)
I either received the following error XQE PLN 0093 / XQE PLN 0264.

What would be the correct way of retrieving the dates for the correct age bucket?
The Order Date in my case, is a pure attribute of the lowest level of a given dimension.

Thanks
Title: Re: RESOLVED: DMR - Age Bucket Filters
Post by: Cognos91 on 17 Jul 2017 12:43:19 PM
Issue Resolved:

Since the 4 dates were defined only as member property of the lowest level in the dimension (hierarchy), the date function worked as adding filter.
days_between (Order Date, _add_days(Current Date, 90)) between 0 and  30, and so on.