AND or OR values in Prompts — Oracle Analytics

Oracle Analytics Cloud and Server

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

AND or OR values in Prompts

Received Response
22
Views
5
Comments
user5388961
user5388961 Rank 1 - Community Starter

Hi,

I have come through a new request that whether can we create or define two buttons And, OR at prompts. so user can choose any of these both if he wants to further filter on the rows

Example:

Chequing Acct Indicator = 1, null values

savings acct indicator = 1, null values

if user choose both 1 value at prompt, it considers and chequing acct indicator =1 and savings acct indicator =1 then the results might be wrong if user choose chequing indicator =1 or saving acct indicator =1. is there a way to facilitate the user to select Either 'AND' or 'OR' at the prompt level between the each column prompt. Thanks.

C..................

Answers

  • jprakash
    jprakash Rank 2 - Community Beginner

    Hi,

    You can achieve using OR in filters and make them "is prompted"

    fltr.jpg

    Thanks,

    JP

  • Felipe_Idalgo
    Felipe_Idalgo Rank 5 - Community Champion

    Hi,

    I suggest you to do that:

    1 - On your prompt add one more field like OPERATOR with values "OR" and "AND";

    2 - Duplicate your analysis as "OR - Analysis" and "AND - Analysis" (these names are examples)

    3 - Create other one analysis to test the field OPERATOR from prompt. If OPERATOR = 'OR' then 1 else 0 end...And create a filter to get this column only when COLUMN = 1 (in other words you get 1 record when users select operator OR from prompt). I will called that by AUX_ANALYSIS

    4 - Publish on your dashboards your 2 analisys each one into your own session and then create a session condition for show "OR - Analysis" or "AND - Analysis" according AUX_ANALYSIS count rows, if count == 1 then show "OR - Analysis", if count < 1 then show "AND - Analysis"

    Don't forget to change filter operator on OR - Analysis" and "AND - Analysis"

    "OR - Analysis" - use OR operator on filters


    "AND - Analysis" - use AND operator on filters


    Felipe Idalgo

  • user5388961
    user5388961 Rank 1 - Community Starter

    This is not much helpful. as the scenario is different, I have 10 indicators and if i want to choose OR column for 1 Indicator, AND  for another indicator. and there might be few combinations.

    if i have 4 products, chequings, savings, mutual fund and business account.

    1. if i require chequing =1 or saving =1 and mutual fund =1, then how?

    2. if i require chequing =1 and saving =1 ( means customers who are having Chequing and Saving both and any of the mutual fund or business account) and mutual fund =1 or business account =1?

    then how can i define in the prompt. So, is there any possibility to populate AND,  OR Values in the prompt and associate to the report.

  • user5388961
    user5388961 Rank 1 - Community Starter

    Hi Felipe_Idalgo .

    Thanks for your reply. this  suggestion only helps if we use only AND among the prompt columns, OR  among the prompt column seperately.

    if i want to choose the combinations among the prompts. how is it possible.

    chequing =1 or saving =1 and commecial loan =1, so i am looking for either customer has chequing or saving and that customer is having commerical loan, then how can i make it work.

    Thanks.

  • Hi,

    your problem is almost impossible to solve in a user friendly way ....

    You said you have 10 indicators (10 different prompts fields) and for each one you want to chose AND / OR.

    But ...

    What about ( and ) ?

    indicator1 AND ( indicator2 OR indicator3 )

    is different than

    ( indicator 1 AND indicator2 ) OR indicator3

    Make this example with 10 indicators and you that you have another issue and not just be able to choose AND / OR for each one of the 10 prompts...