Cognos Analytics

 View Only
  • 1.  Reports - "All rows" value in prompt

    Posted Wed April 28, 2021 03:03 PM
    Hi, 
    how can I  add filter "All" in a prompt ? In Prompt Page I have "static choice" so I'm able to set "All" and to modify query to add this value, but I 
    can not find that option besides "Prompt Page".

    I see an empty value in the prompt ? When I select it I get all the rows...May I change this value for "all"? 
    ReportThanks.
    Marcelo.


    ------------------------------
    Eliseo Marcelo Zabala Aleman
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Reports - "All rows" value in prompt

    Posted Thu April 29, 2021 06:11 AM

    Hi Marcelo,

    I wouldn't suggest adding an "All" element to a prompt because when I want to see everything (unfiltered) I just select nothing to filter. If you want to state that out in your prompt, then edit the text that is displayed in the selection list:


    Result:
    Br

    Robert



    ------------------------------
    Robert Dostal
    Team Leader BI
    GEMÜ
    Ingelfingen
    ------------------------------



  • 3.  RE: Reports - "All rows" value in prompt

    Posted Thu April 29, 2021 08:07 AM
    Hi Robert, thanks for your response.

    When you say "nothing to filter" means select "----------------------------"  (blue).

    Regards.
    Marcelo.


    ------------------------------
    Eliseo Marcelo Zabala Aleman
    ------------------------------



  • 4.  RE: Reports - "All rows" value in prompt

    Posted Fri April 30, 2021 01:39 AM

    Hi Marcelo,

    if you want to select nothing, just select the first entry in the drop down list. The "-----------------------" entry is just a separator between the haeder and the filter options. This works if your detail filters in the query are optional. Othwise I refer to Todd Schumans post.
    Br



    ------------------------------
    Robert Dostal
    Team Leader BI
    GEMÜ
    ------------------------------



  • 5.  RE: Reports - "All rows" value in prompt

    Posted Thu April 29, 2021 10:41 AM
    Edited by System Test Fri January 20, 2023 04:31 PM
    Hi Marcelo,

    I'm not able to see your screen shot but it sounds like you can do something like this.  Add a static value to your prompt (p_prompt).  Set use value to ALL, and Display Value to "All".  Use a query (or additional static values) to populate the other options for the prompt.

    On the query you want to filter, create the filter calc like this:

    if (?p_prompt? = 'ALL)
    then (1=1)
    else [column to filter] = ?p_Prompt?

    Another option would be to do what Robert suggested, set all prompts to optional and change the display text of the prompt values to be "All".  You would need to create a header or label somewhere to let users know what the prompt is for.

    Hope this helps,
    Todd

    ------------------------------
    Todd Schuman
    ------------------------------