If you are unable to create a new account, please email support@bspsoftware.com

 

News:

MetaManager - Administrative Tools for IBM Cognos
Pricing starting at $2,100
Download Now    Learn More

Main Menu

_first_of_month () and getting Error (Relationla Model)

Started by gosoccer, 18 May 2017 12:53:46 PM

Previous topic - Next topic

gosoccer

Hi,
I'm trying to get all the rows that satisfies certain condition before the first of the month. So, basically, the below would provide me what I need but it's failing with an error. So, basically trying to get/show any rows that falls before the first of the month.
[Presentation View].[XXX].[S_DATE] <=_first_of_month ([Presentation View].[XXX].[S_DATE])

QE-DEF-0459 CCException
OP-ERR_0028 Unsupported conditional expression: 'expression = ....."

Pls help if you can.

Thanks so much.

gosoccer

Would the following go back and filter all the cases from 99 days ago if it's in a Data Item above my Crosstab Edge?
(_add_days(_first_of_month(_add_months([UCM Presentation View].[XXX].[S_DATE],-100)),+1))

Thanks so much!

MFGF

Quote from: gosoccer on 18 May 2017 12:53:46 PM
Hi,
I'm trying to get all the rows that satisfies certain condition before the first of the month. So, basically, the below would provide me what I need but it's failing with an error. So, basically trying to get/show any rows that falls before the first of the month.
[Presentation View].[XXX].[S_DATE] <=_first_of_month ([Presentation View].[XXX].[S_DATE])

QE-DEF-0459 CCException
OP-ERR_0028 Unsupported conditional expression: 'expression = ....."

Pls help if you can.

Thanks so much.

Hi,

Can you explain your logic here? That expression doesn't seem to make very much sense to me.

Let's substitute today's date into the expression to see what it would do:

19-May-2017 <= _first_of_month( 19-May-2017 )
which in turn gives us
19-May-2017 <= 01-May-2017

The only dates this would ever return a result for are the first days in any months, eg

01-May-2017 <= _first_of_month( 01-May-2017 )

but in that case, it could only ever be equal, not less than? Can you explain?

MF.
Meep!

BigChris

I think the second S_DATE should really be today's date
[Presentation View].[XXX].[S_DATE] <=_first_of_month (current_date)

gosoccer

Thank you,

You right, Returns only one.

PLS see attached.

In the first column of the Crosstab, called Open Cars Sold suppose to shown the counts based on the begining of the month (First Day of each month), the report needs to show how many rows (Count of Rows) that are based on certain CODE such as (2,3,4).

That is what I'm trying to do.

Thanks for your time.

hespora

the more logical approach for that filter would then be

extract(day,[Presentation View].[XXX].[S_DATE]) = 1

try and see if that works for you

gosoccer

thx so much.
I''m getting the below error,
   Unsupported conditional expressions: 'expression="[__ns_0].[extract(day from UCM Presentation View_ST_DATE)_dim].[extract(day from UCM Presentation View_S_DATE)_dim].[level].[levelkey] = 1"'
No such why it's thinking it's DMR?

The model is Relational.
Thanks a lot :) :)

gosoccer

Unfortunately, As I try creating a data item so I can drop it on top of the Top Edge of a Crosstab to get the
previous month data but it's failing.

[UCM Presentation View].[S_DATE] between _first_of_month(_add_months(current_date,-6)) and _last_of_month(_add_months(current_date,-6))

Getting the error,
   The 'fn:current_date' function is not supported in the context in which it is used.
Any ideas how I can get the Data Item created.

Thanks :) :)

gosoccer

Would you consider this as add (+) one day to the first of month that is going Back
11 Months from the S_DATE?  :) :)