Hi guys,
I have a date in my table called create_date. I'm using the following code in my Calculation section of my FM Model Subject Query.
[Business View].[F_CASE].[CREATE_DATE] between _add_days(current_date,-60) and current_date
This command believe it or not worked at some point. Not sure what changed.
The CREATE_DATE is setup as a FACT or ATTRIBUTE usage in the Property.
I'm getting the following error:
XQE-PLN-0201 Boolean value expression as query Item is not supported
Weird if you ask me?
Thx for your recommendations.
Quote from: gosoccer on 01 Sep 2015 09:04:51 PM
Hi guys,
I have a date in my table called create_date. I'm using the following code in my Calculation section of my FM Model Subject Query.
[Business View].[F_CASE].[CREATE_DATE] between _add_days(current_date,-60) and current_date
This command believe it or not worked at some point. Not sure what changed.
The CREATE_DATE is setup as a FACT or ATTRIBUTE usage in the Property.
I'm getting the following error:
XQE-PLN-0201 Boolean value expression as query Item is not supported
Weird if you ask me?
Thx for your recommendations.
Hi,
That expression looks like a filter to me, not a calculation. I'd be astonished if it ever worked. If you want to do this in a calculation you'd be better using an expression such as
if ([Business View].[F_CASE].[CREATE_DATE] between _add_days(current_date,-60) and current_date) then ('Within 6 months') else ('Not within 6 months')
Cheers!
MF.
I got you. Well, you right but it actually works on my DB2 installed in my computer but doesn't work on
the DB on the main server.
So, if I need the SAME Subject Query to create a measure/calculation showing the # of records for last 6 months in
addition to the regular # of records without the last 6 months filtration, would I need to build a separate Subject Query?
Both of these counts are columns within a Crosstab. One Crosstab shows regular counts and the other column shows
the count for the last 6 months.
Thx again.
Quote from: gosoccer on 02 Sep 2015 06:15:50 AM
I got you. Well, you right but it actually works on my DB2 installed in my computer but doesn't work on
the DB on the main server.
So, if I need the SAME Subject Query to create a measure/calculation showing the # of records for last 6 months in
addition to the regular # of records without the last 6 months filtration, would I need to build a separate Subject Query?
Both of these counts are columns within a Crosstab. One Crosstab shows regular counts and the other column shows
the count for the last 6 months.
Thx again.
If you just want a count of the records within the last six months, then perhaps use:
if ([Business View].[F_CASE].[CREATE_DATE] between _add_days(current_date,-60) and current_date) then (1) else (0)
You can then simply total this.
Cheers!
MF.
OK, Super! Started a new job and after not doing 8 months of development, start getting
rusty already.
Thx so much. This should do the trick.