1.
"This does not work at the moment" is awfully vague. It might be possible that slightly more detail could help identify the source of the difficulty. Usually errors have messages associated with them, either directly or in the log files on the server (the primary ones for queries would be the cognoserver.log and the XQE log files). The messages should give you some information about the nature of the error.
2.
If I correctly understand. this expression fragment is part of a filter. The syntax for filters needs to resolve to a Boolean value.
3.
If you are creating the expression in the modelling tool or dashboard, you can take advantage of the expression editor's selection-based preview functionality, which I document in my blog.
https://community.ibm.com/community/user/businessanalytics/blogs/ian-henderson1/2019/10/17/cognos-analytics-modelling-expression-editor
This allows you to walk through the elements of your expression and test them to see where problems are happening.
If you are doing it in report studio you can do it manually by creating the subexpressions and testing them.
4.
I think what you want is to determine the cases where both the values of the two prompts match using the LIKE syntax and where the SKU numbers match, similarly. Is that a correct understanding? If so, could re-writing the expression in a manner similar to the following do the trick?
(([transaction code] = '#Value1#') like ( ([transaction code] = '#Value#')))
and
([SKU number] ) like ( [SKU number]))
5.
One problem with that is why are you prompting twice to get the same value if your filter is trying to match those values? Are the two transaction codes objects (i.e. in different tables)?
I think it could also help to clarify what your expression is trying to do.
6.
Is there any particular reason why you are using the LIKE operator?
------------------------------
IAN HENDERSON
------------------------------
Original Message:
Sent: Thu September 24, 2020 07:42 AM
From: Steven White
Subject: expressions
Just joined and wondering if anyone could help, I have written this below
IF ([SKU number] and ([transaction code] = '#Value1#') like ([SKU number] and ([transaction code] = '#Value#')))
So the idea is that it only displays results with both Value1 and Value2 transaction codes but with the same SKU number.
This does not work at the moment, is there a better way of performing this search criteria in IBM Cognos Analytics. using in the Detail Filter expression.
------------------------------
Steven White
------------------------------
#CognosAnalyticswithWatson