Oracle Analytics Cloud and Server

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

how to pass values to a presentation variable including All Column Values

Received Response
43
Views
5
Comments
User_G8P21
User_G8P21 Rank 2 - Community Beginner

Hello

I have a requirement where I need to cascade values from one prompt to another using "SQL Results" option using presentation variables. ( I have given presentation variables for both the prompts)

I was able to cascade the values from one prompt to another but when I choose All Column Values it is not getting passed and the prompt shows blank.

After that I found a way to pass the All Column Values, now my query is not giving any results when I choose more than one value in the prompt.

Please help me with the query that works if I choose All Column Values and also works if I choose more than one value.

Answers

  • Andrew Fomin.
    Andrew Fomin. Rank 6 - Analytics Lead

    I hope you aren't trying to invent "Limit values by" function?

    But here is my version of the query:

    SELECT "your column" FROM "your subject area" WHERE ("your filter column" in (@{your_variable}['@']{'na'}) or '@{your_variable}' = '') ORDER BY 1
    
  • User_G8P21
    User_G8P21 Rank 2 - Community Beginner

    Hello Andrei

    Thanks for the reply, but the query you have provided is not working for "All Column Values"

  • Andrew Fomin.
    Andrew Fomin. Rank 6 - Analytics Lead

    What do you mean by "is not working"? Does It throw an error? Or does it give the unexpected result? Or no result at all?

    It works for me. See this sample video.

    https://gfycat.com/ForsakenUnsightlyHorsechestnutleafminer

  • User_G8P21
    User_G8P21 Rank 2 - Community Beginner

    When i select All Column Values, the next prompt is not showing any results. Could you please send the same query you used using your presentation variable?

  • Andrew Fomin.
    Andrew Fomin. Rank 6 - Analytics Lead

    Here is the exact query (it is based on Oracle's Sample Sales Lite demo, so you can easily reproduce it):

    SELECT "Products"."Product Type" FROM "Sample Sales Lite"  where  "Products"."LOB"  in (@{p_lob}['@']{'na'}) or '@{p_lob}' = ''