Skip to Content
avatar image
Former Member

How to seperate several formulas data with similar conditions?

Hi,

I have 3 formulas in the group footer where each row refers to each record.

Each row should show 0  0   1  or 1   0   0   or 0  1   0 but since some conditions are the same or the returned data is not accurate.

Is there a way to distinguish between formulas instead of adding more conditions to each formula?

IF ISNULL({END_DATE.date_value}) then '1' 

ELSE IF currentdate > {END_DATE.date_value} and Year({END_DATE.date_value}) = year(currentdate) then '1' 

ELSE '0'

IF ISNULL({END_DATE.date_value}) then '1' 

ELSE IF currentdate >= {START_DATE.date_value} and Year({START_DATE.date_value}) = year(currentdate) and currentdate <= {START_DATE.date_value} then '1' 

ELSE '0'

IF ISNULL({START_DATE.date_value}) then '1' 

ELSE IF currentdate < {START_DATE.date_value} and Year({START_DATE.date_value}) = year(currentdate) then '1' 

ELSE '0'

Regards,

B.

Add comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • Jan 07, 2015 at 03:26 PM

    Hi Barry,

    Try:

    IF

    (

    ISNULL({END_DATE.date_value}) OR

    ISNULL({START_DATE.date_value}) OR

    (currentdate IN [{START_DATE.date_value} TO {START_DATE.date_value}] AND Year({START_DATE.date_value}) = year(currentdate)) OR

    (currentdate > {END_DATE.date_value} AND Year({END_DATE.date_value}) = year(currentdate)) OR

    (currentdate < {START_DATE.date_value} AND Year({START_DATE.date_value}) = year(currentdate))

    )

    then '1'

    Else '0'

    -Abhilash

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Abhilash Kumar

      Hi,

      I managed to get the results needed for the moment so thank you for the help.

      I have another question so I will open it in a new post

      Barry.