Hi all,
Just to frame the use case:
I have implemented the ML Workbench duplicate customer master data checker. Each customer can be flagged by none, one, or multiple duplicate search patterns.
Suppose I have 2 different search patterns A and B.
Further, suppose I have 5 customers: 1, 2, 3, 4, and 5.
First, I have created a OLAP that has three columns (as can be seen in the attached screenshot):
- Column 1: The customer number
- Column 2: A simple case when flag, showing if the search pattern A identified the customers as a potential duplicate (1 = YES; 0 = NO)
- Column 3: Same as column 2 but for search pattern B
Now, I want to define a button dropdown / dropdown that lets me select none, one, or multiple search patterns and behaves in a certain way if are MULTIPLE entries are selected from the dropdown.
- If none is selected, all 5 customers should be displayed (i.e. all customers). (works fine)
- If one is selected, then only those customers should be shown for which the search pattern identified them as potential duplicates (works fine).
- However, if I select both search patterns A and B, then the OLAP shows all customers that were identified as potential duplicates by EITHER A or B. This is not my desired outcome. In case of selecting the search patterns, I want to ONLY show customers 3 and 4 because they were both flagged as potential duplicates by BOTH search patterns.
----------------------
I have already tried the following approach but not successfully (maybe this is a right approach but my syntax was wrong?
- Writing the selected entries to a variable <%=search_patterns%>
- Creating a FILTER statement combined with a CASE WHEN statement to ONLY filter on customer that were flagged by search pattern A when search pattern A is selected in the dropdown and search pattern B respectively, such as:
FILTER
CASE
WHEN <%=search_patterns%> LIKE '%A%'
THEN PU_COUNT ( DOMAIN_TABLE ( TABLE.CUSTOMERS ) , TABLE.PATTERNS,
TABLE.PATTERNS = 'A' ) >= 1;
ELSE ISNULL(NULL)=1
END
--> And similar statement for search pattern B
@david.beche12 Any idea on how to implement this?
Best,
Florian