6 Replies Latest reply: May 19, 2017 8:24 AM by Sunny Talwar RSS

    how to add year in the expression

    naveen kumar

      Hello,

      I Want to count  only those customer ID 's who have bought FE product and AD product both in same year


      table1:

      ID     year            product  

      101           2008             FE

      102           2008             FE

      103           2009             FE

      104           2014              FE        

       

      table2:

      ID     year            product  

      101           2008           AD

      102           2010            AD

      103           2013            AD

      104            2014             AD

       

      i mean to say from table1

      101           2008             FE

      104           2014              FE 

      and table2

      101           2008           AD

      104            2014             AD


      my count is 2

      expression i wrote :


      =Count(DISTINCT{<ID = p({<product= {'FE'}>})*p({<product ={'AD'}>})>}ID)  this expression is only to get count of common ID's from both table irrespective of the year they bought  (working great)


      but how to add year in it


      can any help plz


      thanks

      naveen