Oracle Transactional Business Intelligence

Welcome to the Oracle Analytics Community: Please complete your User Profile and upload your Profile Picture

Filter with an OR condition

Received Response
21
Views
4
Comments

I have two fields: Field A and Field B

I want to pull all records, which may have value 'SPLTAG' in either of the two columns.

How do I create a combination filter across two columns ?

Tagged:

Answers

  • MandeepGupta
    MandeepGupta Rank 8 - Analytics Strategist

    Hi Pavan,

    Welcome to Oracle analytics community.

    Please try below:

    SELECT * FROM table tab

    WHERE (tab.A LIKE '%SPLTAG%' OR tab.B LIKE '%SPLTAG%' )

    Thanks.

  • Pavan Cheruvu-Oracle
    Pavan Cheruvu-Oracle Rank 2 - Community Beginner

    Tx for your inputs, Mandeep.

    Field A and Field B are from different subject areas

    Is there a way to get the OR condition on the Criteria tab of OTBI ?

  • Rich Merkel
    Rich Merkel Rank 6 - Analytics Lead
    edited Oct 10, 2025 1:36PM

    Hi,

    For analysis, in filter area, click on "And"

    image.png

    and it will update to "Or"

    image.png

    Or you can try creating complex query with two subject areas (or two of same subject area), just need to make sure your fields align (sometimes helpful too if creating pivot table views) see like below after creating analysis using first subject area, click the icon in upper right to add 2nd subject area into the complex analysis.

    image.png

    using two subject area (invoice number from each, and field A/B from each)

    image.png

    filter on field A in first subject area

    image.png

    filter on field B from second subject area

    image.png
  • Pavan Cheruvu-Oracle
    Pavan Cheruvu-Oracle Rank 2 - Community Beginner
    edited Oct 10, 2025 1:37PM

    Thanks @Rich Merkel . I will try the steps and revert to you on the outcome.

    Thanks for the detailed steps.