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

Conditional filter

Started by elroy, 23 May 2011 03:12:07 AM

Previous topic - Next topic

elroy

Hi all,
are there any options/possibilities to create a report with a conditional filter?
This filter should only be active when different conditions are true (e.g. only on the last of a month)?

Thanks and Regards,
elroy

PRIT AMRIT

QuoteThis filter should only be active when different conditions are true (e.g. only on the last of a month)?

If you want to filter your report on last of month, then you can put the below filter:

[DATE]=_last_of_month(current_date)

If you want to write a condition, then it should be something like below,

_last_of_month([DATE]) and [your condition 1]
or
[Condition 2]
or
[Condition 3]

Hope it helps?

Thanks

elroy

#2
At first, thanks for your reply..
But unfortunately it is not the solution i am searching for.

It should work as follow:

There are two different filters and only one should work if a condition is true.
It has to be something like that:

If ([DATE]=_last_of_month(current_date))
Then (show me all of the last 8 weeks)
Else (show me all of this month)

Are there any other ideas?

Thanks and regards,
elroy


Lynn

Below logic checks if today is the last day of the month and filters data to include 8 weeks (56 days) if it is. Otherwise if today is any day other than the last of the month then filter for the current month.


(
  current_date = _last_of_month(current_date)
  and [DATA_DATE] >= _add_days(current_date, 56)
)
or
(
  current_date <> _last_of_month(current_date)
  and [DATA_DATE] between _first_of_month(current_date) and _last_of_month(current_date)
)


elroy

Yes, this is it.
A simple logic expression and it works.

Thank you!!!
Regards,
elroy