Skip to Content

BEx designer- Or condition on dates


Hi All,

I need to extract data using bex query with a condition on start date and end date as .

Start date From 1/1/2000 to 1/31/2000

OR

End date from 1/1/2000 to 1/31/2000

Which is , all the records that has either startdate or end date as above . If a record has startdate as 1/21/2000and end date as 2/27/2000 or Null I want it to be captured .can youhelp with suggestions.

Thank you!

Add comment
10|10000 characters needed characters exceeded

  • Follow
  • Get RSS Feed

4 Answers

  • Best Answer
    avatar image
    Former Member
    Apr 06, 2016 at 07:45 AM

    Hi Raja,

    Follow this procedure.

    Create a selection (lets say KF1) including your KF, with a filter on Start Date where you filter with the reuqired date range.

    Create another selection (lets say KF2) including your KF with a filter on End Date where you filter with the reuqired date range.

    Create one more selection ((lets say KF3) including your KF with one filter on Start date where you filter with the reuqired date range and another filter on End Date where you filter with the reuqired date range.

    Then simply add a formula such as

    KF4 = KF1 + KF2 - KF3.

    KF4 is what you require.

    Regards

    Yasemin...

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Raja M

      Hi Raja,

      If you don't have any key figures in your cube and not planning to have any on the report, then create a CKF with a formula as 1 and use this KF with the restrictions I mentioned in my previous post. I think that's something like Swati has suggested.

      Regards

      Yasemin...

  • Apr 06, 2016 at 05:44 AM

    Hi,

    You may create 2 copies for every KF you have..

    For example, you have 3 KFs in your report, let's call them KF_1, KF_2, and KF_3..

    You need to create 3 more KFs..So,

    KF_1 - filter with START_DATE from 1/1/2000 to 1/31/2000 (or the variable you are using)

    KF_1_COPY - filter with END_DATE from 1/1/2000 to 1/31/2000 (or the variable you are using)

    KF_2 - filter with START_DATE from 1/1/2000 to 1/31/2000 (or the variable you are using)

    KF_2_COPY - filter with END_DATE from 1/1/2000 to 1/31/2000 (or the variable you are using)

    KF_3 - filter with START_DATE from 1/1/2000 to 1/31/2000 (or the variable you are using)

    KF_3_COPY - filter with END_DATE from 1/1/2000 to 1/31/2000 (or the variable you are using)

    HIDE them all..

    Create another 3 formulas..

    KF_1_FINAL = KF_1 + KF_1_COPY

    KF_2_FINAL = KF_2 + KF_2_COPY

    KF_3_FINAL = KF_3 + KF_3_COPY


    So you still have 3 final keyfigures, the KF_1_FINAL, KF_2_FINAL, and KF_3_FINAL..



    Regards,

    Loed

    Add comment
    10|10000 characters needed characters exceeded

  • avatar image
    Former Member
    Apr 06, 2016 at 02:15 AM

    Hi,

    here you mentioned, you wanted to filter only Jan 2000 data

    Start date From 1/1/2000 to 1/31/2000

    OR

    End date from 1/1/2000 to 1/31/2000


    but in here, you mentioned both JAN , FEB and null values

    If a record has startdate as 1/21/2000and end date as 2/27/2000 or Null I want it to be captured

    can you explain what is your requirement ?

    Add comment
    10|10000 characters needed characters exceeded

    • Former Member Raja M

      Hi,

      Not sure if I understood your requirement correctly, if you need to extract all records including date as NULL , then why do you need condition/filter ?

  • Apr 06, 2016 at 02:38 AM

    using customer exit u can achieve,

    Add comment
    10|10000 characters needed characters exceeded