4 Replies Latest reply: Mar 26, 2018 8:13 AM by Shiren Mathai RSS

    Set expression to find common records

    Shiren Mathai

      Hi All,

       

      Could you please someone help me to correct the set expression. I have two tables, on first table showing the groups and count of users. Second table showing the user details. Users can have multiple groups. If i select multiple groups on first table then users coming in common needs to show on user details table. For example in the attached application if i select group A,B,C then second table should show only the user 1 details.

       

      Set expression used:-

       

      if(getselectedcount(Group)>0,

      count( distinct {<User={"=aggr(count(distinct Group),User)=getselectedcount(Group)"}>} User) ,

      count(distinct User)

      )

       

      Users:

      LOAD  * inline   [

      User, Name

      1, ABC

      2, BCD

      3, EFG

      4, RTG

      5, YUR

      6, IOB

      7, LIK

      ];

       

      Matrix:

      LOAD  * inline   [

      Group,User

      A,1

      B,1

      C,1

      B,2

      A,2

      C,3

      D,4

      C,5

      D,5

      E,5

      E,5

      F,6

      G,7

      ];