Cognos Analytics

Cognos Analytics

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


#Product
#Analytics
#CognosAnalytics
#Analyticstools
#TechXchange Partner
#TechXchange Session
#TechXchange Presenter
#AI
 View Only
  • 1.  Need Help on Prompts

    Posted 04/24/19 03:29 AM
    ​Hi ,

    I have 2 prompts like ?p1? and ?p2? with the same source column(query.ID).
    Using 2 different prompts with same column due to Between calculation.
    It is working fine for between but needed single selection also. Measn if user select ?p1? then report need to pass to p1 prompt and not for p2.

    Suggested me please :)

    Thank,
    Vijay

    ------------------------------
    Vijay Kumar Boga
    ------------------------------

    #CognosAnalyticswithWatson


  • 2.  RE: Need Help on Prompts

    Posted 04/24/19 11:11 AM
    Hi Vijay,
    Assuming that you're using Report Studio, you can define a filter as follows:

    #
    case prompt('pHigh', 'string', 'default', '', '[BUSINESS_LAYER_DIMENSIONED].[CUSTOMER_D].[CUSTOMER_GEOGRAPHY_H].[COUNTRY_CD_L].[COUNTRY_CD]' )
    when 'default' then
    '[COUNTRY_CD] = ' + prompt('pLow', 'string','','', '[BUSINESS_LAYER_DIMENSIONED].[CUSTOMER_D].[CUSTOMER_GEOGRAPHY_H].[COUNTRY_CD_L].[COUNTRY_CD]' )
    else
    '[COUNTRY_CD] between ' + prompt('pLow', 'string','','', '[BUSINESS_LAYER_DIMENSIONED].[CUSTOMER_D].[CUSTOMER_GEOGRAPHY_H].[COUNTRY_CD_L].[COUNTRY_CD]' ) + ' and ' +
    prompt('pHigh', 'string', 'default', '', '[BUSINESS_LAYER_DIMENSIONED].[CUSTOMER_D].[CUSTOMER_GEOGRAPHY_H].[COUNTRY_CD_L].[COUNTRY_CD]' )
    end
    #

    In this case the  [BUSINESS_LAYER_DIMENSIONED].[CUSTOMER_D].[CUSTOMER_GEOGRAPHY_H].[COUNTRY_CD_L].[COUNTRY_CD] is the business key of DMR level, but you can use a column or calculation reference instead.

    There is also a in_range operator that could be useful, however it doesn't meet your exact requirements. In that case you can use expressions like:  [ns].[qs].[column] in_range ?p1?

    //Henk

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