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

Filter Expression

Started by vito36, 04 Mar 2015 03:18:39 AM

Previous topic - Next topic

vito36

Hi
Im currently trying to put the below in a filter expression
Any ideas
IF
(current_date=2015-02-23)
THEN


([del_note_date] BETWEEN 2015-02-01 AND 2015-02-23
)

ELSE NULL))

MFGF

Quote from: vito36 on 04 Mar 2015 03:18:39 AM
Hi
Im currently trying to put the below in a filter expression
Any ideas
IF
(current_date=2015-02-23)
THEN


([del_note_date] BETWEEN 2015-02-01 AND 2015-02-23
)

ELSE NULL))

How about:

current_date = 2015-02-23 AND [del_note_date] BETWEEN 2015-02-01 AND 2015-02-23

MF.
Meep!

vito36

#2
Hi I need  to Add multiple cases to the statement

example:

when current_date = 2015-02-23 then [del_note_date] BETWEEN 2015-02-01 AND 2015-02-23

when current_date = 2015-03-24 then [del_note_date] BETWEEN 2015-03-01 AND 2015-02-24

BigChris

Ok, there looks like there are a couple of typos in your question, but reading between the lines it looks like you want something like:

[del_note_date] between _first_of_month(current_date) and current_date

MFGF

#4
Quote from: vito36 on 05 Mar 2015 03:29:52 AM
Hi I need  to Add multiple cases to the statement

example:

when current_date = 2015-02-23 then [del_note_date] BETWEEN 2015-02-01 AND 2015-02-23

when current_date = 2015-03-24 then [del_note_date] BETWEEN 2015-03-01 AND 2015-02-24

How about:

(current_date = 2015-02-23 AND [del_note_date] BETWEEN 2015-02-01 AND 2015-02-23)
OR
(current_date = 2015-03-24 AND [del_note_date] BETWEEN 2015-03-01 AND 2015-03-24)
Meep!

BigChris

Just as a by-the-by, the second clause in your filter won't ever evaluate to TRUE - the end date in your date range is before the start date...that was the typo I was specifically referring to earlier.

MFGF

Quote from: BigChris on 05 Mar 2015 07:58:42 AM
Just as a by-the-by, the second clause in your filter won't ever evaluate to TRUE - the end date in your date range is before the start date...that was the typo I was specifically referring to earlier.

Whoops! I just fixed that in my reply! Thanks Chris! :)
Meep!

BigChris

You're welcome - it was in the original text from the vito36...just thought I'd point it out.