Skip to main content

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?

  1. Writing the selected entries to a variable <%=search_patterns%>
  2. 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

 

 

 

Quick follow-up on this. can anybody help out here?

 

@gabriel.okaba11 ?

@david.beche12 ?

 

:)


Hi @florian.hoerl12 ,

Celopeers is an open community. If you need direct support that is time-sensitive, please use the Partner Portal (Click on Connect->Technical Advisory) and schedule a session. For further questions on the feature, you can always connect with your Partner Delivery Manager.

 

Best,

Gabrielimage


@florian.hoerl12 In case that was not answered yet:

 

You can create a saved formula with a CASE WHEN that returns either 'both', 'A', 'B' or 'none', depending on whether both patterns apply, or only 'A', or only 'B', or none. The CASE WHEN could look like this:

CASE WHEN <condition for A> AND <condition for B> THEN 'A and B' 

  WHEN <condition for A> THEN 'A'

  WHEN <condition for B> THEN 'B'

ELSE 'none'

END

 

Now you can use this to populate a button dropdown. Don't allow multiple selections in that dropdown and wrap the result in ' characters.

Store the result in a variable.

 

Use this filter statement:

FILTER <%=var%>= 'none' OR KPI("patternKpi")= <%=test%>;

 

Best

David


Hi Florian,

I believe You can solve this by adding a Component Filter to the OLAP table (right click - Component filter) and set your logic there with an AND and not the OR statement. This should give You the desired output, as the previous one You have tried wasn't filtering the table at all, it was just showing you all the outputs matching Your 2 dropdown patterns.

Reply