12 Replies Latest reply: May 23, 2017 5:18 AM by naveen kumar RSS

    how to write expression

    naveen kumar

      Hello,

              how to get count of common customers who bought product in both Finance and AD in the same year

      i wrote a expression for common customers who bought product in  Finance and AD irrespective of year,

      i mean if some customer bought a finance product in 2014 and same customer bought a AD in 2016 that will make my count as 1

      which i am able  to achieve by below expression


      Count(distinct{<MGCID =p({<Group ={'AD'}>})* p({<Group = {'Finance'}>})>}MGCID)    (working good)

       

      Now i want count of customers who bought in same year

      i mean if some customer bought a finance product in 2014 and same customer has to buy a AD product  in 2014 then my count is 1


      i have Year field

      Untitled.png