Cognos Analytics

Cognos Analytics

Connect, learn, and share with thousands of IBM Cognos Analytics users! 

 View Only
  • 1.  Multiple filters on same column

    Posted Wed July 08, 2020 09:47 AM
    My report has a column called "location" that includes countries and cities at the same time. ex: (Germany, Paris, Boston, Sweden, Miami, Spain, Rome, etc..)  My prompt page has two multi-select prompts, one to select a ?country? the other for ?city?


    How can I make my filter on the location column accept input from both prompts at same time?
    • I have tried [location] in (?country?, ?city?)  it did not work when both prompts are selected.

    • I have tried two separate filters, one [location] in (?country?) the other [location] in (?city?) still did not work with multi select n each prompt. 


    Any ideas are appreciated.

    #CognosAnalyticswithWatson


  • 2.  RE: Multiple filters on same column

    Posted Wed July 08, 2020 09:57 AM
    Hi Richard,
    Please try:

    [location] in (?country?)  OR  [location] in (?city?)

    //Henk

    ------------------------------
    HENK CAZEMIER
    ------------------------------



  • 3.  RE: Multiple filters on same column

    Posted Wed July 08, 2020 10:14 AM
    Thank you @HENK CAZEMIER

    This would work if I select values for both prompts.
    However when I select values for ?country? and leave ?city? blank, I get results for the countries I selected and ALL the cities.
    I would like to only return values for countries selected.


    Any ideas or modification?
    Thanks!




  • 4.  RE: Multiple filters on same column

    Posted Thu July 09, 2020 02:44 AM
    Hello @Richard Mabjish,

    Use filter condition as follows:-

    instr(
    # sq(
    join( ';', array (promptmany('country','token','''NA-Country'''),
    promptmany('city','token','''NA-City''') )
    )
    ) #
    ,[location])>0

    Please Note :- This would require local processing and might impact performance.

    Hope this helps.



    ------------------------------
    Dinesh K. Dhiman
    BI Architect,
    IBM Data and AI Experts Labs | India Software Lab Services
    ------------------------------



  • 5.  RE: Multiple filters on same column

    Posted Thu July 09, 2020 01:08 PM
    Thank you @Dinesh K. Dhiman

    I appreciate your help and  will give it a try.​