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

Cognos 8 - Report Studio

Started by giovanni.lucarelli, 10 Oct 2008 03:37:25 AM

Previous topic - Next topic

giovanni.lucarelli

Hi,
first of all I wanna tell u that I'm not expert about Cognos 8 Report Studio so, maybe, my question could be very stupid for somebody  :-[
however...I have this problem: I have a prompt on Time Regular Dimension where I choose a month...well...I need in my report billling for the month that i choosed and for the previous one.

which function I should to use to obtain the previous munth?

(I am working with Oracle 10g db)

Please help me...thanks for everybody

blom0344

For a dimensional package I would guess the prevMember function, for a relational package you can use a CASE expression:

CASE WHEN
[MONTH] = 1 THEN 12
ELSE [MONTH] - 1
END

giovanni.lucarelli

thanks very much blom0344 to reply so fast...  ;)

yeah, I forgot to tell u that I have a dimensional package.... but the problem persists still... this becasue if I use a prompt filter (id est year=2007) in my report I have the year selected by the prompt (2007 in this case) but I've no the previous (using prevMember function) 'cause the report is filtered by that prompt ...
sorry for my englisk  :-[


Suraj

of course it'll be blank if you filter the query for 2007 and try to go back to 2006.
you have to use similar logic for year as well or just have both years come to the report and apply logic when month is 1, go for 12 month of last year.

vincentsquirexiii

try this in the filter:


"([year] = ?year_parameter?) or ([year] = ?year_parameter? - 1)"