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 a comment
10|10000 characters needed characters exceeded

Related questions

4 Answers

  • Best Answer
    author's profile photo Former Member
    Former Member
    Posted on 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 a 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...

  • Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • author's profile photo Former Member
    Former Member
    Posted on 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 a comment
    10|10000 characters needed characters exceeded

  • Posted on Apr 06, 2016 at 02:38 AM

    using customer exit u can achieve,

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.