IBM Support

Using a parameter with multiple conditions in a single and multi value context

How To


Summary

When a filter or prompt macro is created using a parameter in both a single and multi context, you will see different results in DQM from CQM.

DQM treats it as single-value parameter whereas CQM treated it as a multi-valued parameter. In DQM, you will see a warning message indicating this.

XQE-WRN-0060 The parameter “p_product" is used in both a multi-value and a single-value context. The parameter will be treated as a single-value parameter.

The CQM behavior was not ideal because if multiple values were selected by the user, you were not guaranteed to know which value would be used in the context of the single-value expression.
 
As a general rule, when consolidating parameter capabilities, the most restrictive capability wins. In this case, a single-value parameter is more restrictive than a multi-valued parameter. This behavior in DQM, which is new for relational, is consistent with the OLAP behaviour in both CQM and DQM.
 
Should one insist on having a multi-select prompt for a certain parameter, they must ensure that every instance of the parameter is used in a multi-value context. You will be able to modify the expression with a simple change, all while keeping their filters logically equivalent.
 
For example, the following filter expression uses ?p_Productline? both in a single value context (before the OR) and a multi-value context (after the OR)
 
[Product line code] in (?p_Productline?) or ?p_Productline? =100
 
To use this in multi-valued context in DQM, you can rewrite the expression with an IN clause, such as:
 
(100) in ?p_Productline?  or [Product line code] in (?p_Productline?)

Another example that would have worked in multi-value context in CQM but not in DQM is:

    ?p_product? = 'ALL' OR [Sales (query)].[Products].[Product line] in (?p_product?)

To use this in multi-valued context in DQM, you can rewrite the first part of the expression with an IN clause:

    'ALL' in (?p_product?) OR [Sales (query)].[Products].[Product line] in (?p_product?)
 
In above examples, the ?p_Productline? and ?p_Product? parameters are used strictly in a multi-value context and the filter expression logically behaves the same as before.

Document Location

Worldwide


[{"Line of Business":{"code":"LOB76","label":"Data Platform"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Product":{"code":"SSTSF6","label":"IBM Cognos Analytics"},"ARM Category":[{"code":"a8m0z000000CbsBAAS","label":"Reporting-\u003EReport Authoring"}],"ARM Case Number":"TS004522981","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Version(s)"},{"Product":{"code":"SS6G84","label":"IBM Cognos Analytics on Cloud"},"Business Unit":{"code":"BU048","label":"IBM Software"},"Component":" ","Platform":[{"code":"","label":""}],"Version":"","Edition":"","Line of Business":{"code":"LOB76","label":"Data Platform"}}]

Log InLog in to view more of this document

This document has the abstract of a technical article that is available to authorized users once you have logged on. Please use Log in button above to access the full document. After log in, if you do not have the right authorization for this document, there will be instructions on what to do next.

Document Information

More support for:
IBM Cognos Analytics

Component:
Reporting->Report Authoring

Software version:
All Version(s)

Document number:
6376168

Modified date:
01 May 2025

UID

ibm16376168

Manage My Notification Subscriptions