0 Replies Latest reply: Jun 14, 2017 5:35 AM by Federico Moreno RSS

    common elements between two lists

    Federico Moreno

      Hi,

       

      I am trying to find out the common elements between to lists, not during the load script but during the use of the app using an expression.

       

      The reason is to find out the common elements between two different periods of time.

       

      I was trying to use set analysis forcing the intersection of both periods of time and using the concat function to show only the common elements. I just can't seem to get it to work.

       

      The expression currently looks like this:

       

      Concat({<CLIENT_NAME= P({<$(=text($(vPeriod1)))>*<$(=text($(vPeriod2)))>} CLIENT_NAME)>} DISTINCT CLIENT_NAME,',')

       

      So I have certain clients on period 1 of time and another group of clients for period 2. I am trying to get the common clients between periods. Using the expression showed previously, the result is, not the intersection, but the larger list of clients of one of the two periods.

       

      Any idea on how to approach this issue? Maybe a whole different expression?