Categories
How to correctly script the "OR" function in Group Filter section in Data Model in OBIEE?

Summary
In OBIEE, an error was prompted when I was scripting the "OR" function in Group Filter section of the Data Model interface.
Content
Hello Oracle community,
In OBIEE, an error was prompted when I was scripting the "OR" function in the Group Filter section of the Data Model interface.
Please see attached screenshot for the two attempted scripts (also listed below), and their respective error messages.
1) G_1.ITEM_NUMBER == ABC OR DEF
2) G_1.ITEM_NUMBER == ABC OR G_1.ITEM_NUMBER ==DEF
The intend of the script is to have the data model to only produce records for specified items, using their item number (i.e. ABC, DEF). For clarification, the entries are coded with alphabets albeit the column/attribute title spells "ITEM_NUMBER". So far I only got to filter on a single item using the script below, which works:
G_1.ITEM_NUMBER == ABC
Thank you.
Jon
Comments
-
Hi Jon,
You need to use the logical expressions instead of explicit OR / AND.
e.g.:
- OR is ||
- AND is &&
So on your particular case below expression should work:
G_1.ITEM_NUMBER == ABC || G_1.ITEM_NUMBER == DEF
Best regards,
Robert
0 -
Hello Robert,
Thank you for advising the solution.
Could you kindly review the attached 3 screenshots, and comment on the possible reasons the published reports were not published according to the intended filters?
1) Screenshot 1
• Proving that the entry "HG" and "D99" are parts of the default data model when it is not filtered. Their respective attributes are "Attribute4" and "Attribute5".2) Screenshot 2 (It is posted on a subsequent message because only one image attachment is allowed per message, please advise if there are ways to post multiple images within one message)
• No entries were displayed when I filter attribute "Attribute4" to only show entries of "HG" using the following code:
G_1.ATTRIBUTE4 == HG3) Screenshot 3 (It is posted on a subsequent message because only one image attachment is allowed per message)
• Neither entries "HG" nor "D99" showed up on attributes "Attribute 4" and "Attribute 5" respectively, after using the following code:
G_1.ATTRIBUTE4 == HG || G_1.ATTRIBUTE5 == D99Best.
Jon
0 -
Screenshot 2.
* Please also see attached file for your reference that under "Tree View" the filtered data model shows only the word "DATA_DS" without entries.
0 -
Screenshot 3
*Also attached for your reference the resulting report exported in .xlsx format.
Thank you.
Jon
0