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
Log InLog in to view more of this document
Was this topic helpful?
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