2 Replies Latest reply on Nov 6, 2018 8:29 AM by Matheus Rodrigues Pires

    Count products sold before and after connection

    Matheus Rodrigues Pires

      Hi,

           I'm basically trying to count how many product where sold before and after the client connected to the network.

       

       

      Because i have Date access and time access as one field, I split them to make this comparison: When Bought

       

      Antes do acesso: Would be if the client bought the product before conecting to my network

      Depois do acesso: If he bought the product after the conection 

       

      In the field "When bought" is a:

      min(IF [date access] = [Data buy] AND

      [time access] > [time buy]

      then "Antes do acesso"

      ELSE "Depois do Acesso"

      END)

       

      I did the field Bought to try count them.

       

        The "Bought" field it's a :

      IF CONTAINS([bought],'Antes do acesso') then '1'

      ELSE '2'

      END

       

                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

      ProductDate buyTime buyDate accessTime accessWhen boughtBought
      Product 1 08/09/201816:4908/09/201821:30:00Antes do acesso1
      Product 214/09/201812:3314/09/201815:58:15Antes do acesso1
      Product 308/09/201816:3908/09/201821:30:00Antes do acesso1
      Product 417/10/201820:5717/10/201815:21:50Depois do Acesso2
      Product 513/09/201811:3613/09/201814:46:35Antes do acesso1
      Product 627/09/201814:1727/09/201817:28:35Antes do acesso1
      Product 714/09/201813:4914/09/201817:47:05Antes do acesso1
      Product 828/09/201821:1829/09/201800:27:50Depois do Acesso2
      Product 927/09/201812:5327/09/201817:19:30Antes do acesso1
      Product 1025/10/201812:2025/10/201812:34:40Antes do acesso1
      Product 1125/10/201812:2026/10/201800:42:50Depois do Acesso2
      Product 1227/09/201813:5527/09/201817:19:30Antes do acesso1
      Product 1328/09/201819:3828/09/201822:02:20Antes do acesso1
      Product 1408/09/201816:3908/09/201821:30:00Antes do acesso1
      Product 1523/10/201811:2423/10/201814:58:55Antes do acesso1
      Product 1607/09/201817:5707/09/201821:08:00Antes do acesso1
      Product 1719/09/201812:1119/09/201815:46:55Antes do acesso1
      Product 1829/09/201815:3629/09/201819:28:20Antes do acesso1
      Product 1907/09/201817:5707/09/201821:08:00Antes do acesso1
      Product 2004/10/201815:3904/10/201819:39:55Antes do acesso1
      Product 2108/09/201820:2308/09/201823:58:50Antes do acesso1
      Product 2220/10/201814:0320/10/201817:41:20Antes do acesso1
      Product 2315/10/201814:4515/10/201817:44:00Antes do acesso1

                                                                                                                                                                                                                                                                                                                                                    

      ProductDate buyTime buyDate accessTime accessWhen boughtBought
      Product 1 08/09/201816:4908/09/201821:30:00Antes do acesso1
      Product 214/09/201812:3314/09/201815:58:15Antes do acesso1
      Product 308/09/201816:3908/09/201821:30:00Antes do acesso1
      Product 417/10/201820:5717/10/201815:21:50Depois do Acesso2
      Product 513/09/201811:3613/09/201814:46:35Antes do acesso1
      Product 627/09/201814:1727/09/201817:28:35Antes do acesso1
      Product 714/09/201813:4914/09/201817:47:05Antes do acesso1
      Product 828/09/201821:1829/09/201800:27:50Depois do Acesso2
      Product 927/09/201812:5327/09/201817:19:30Antes do acesso1
      Product 1025/10/201812:2025/10/201812:34:40Antes do acesso1
      Product 1125/10/201812:2026/10/201800:42:50Depois do Acesso2
      Product 1227/09/201813:5527/09/201817:19:30Antes do acesso1
      Product 1328/09/201819:3828/09/201822:02:20Antes do acesso1
      Product 1408/09/201816:3908/09/201821:30:00Antes do acesso1
      Product 1523/10/201811:2423/10/201814:58:55Antes do acesso1
      Product 1607/09/201817:5707/09/201821:08:00Antes do acesso1
      Product 1719/09/201812:1119/09/201815:46:55Antes do acesso1
      Product 1829/09/201815:3629/09/201819:28:20Antes do acesso1
      Product 1907/09/201817:5707/09/201821:08:00Antes do acesso1
      Product 2004/10/201815:3904/10/201819:39:55Antes do acesso1
      Product 2108/09/201820:2308/09/201823:58:50Antes do acesso1
      Product 2220/10/201814:0320/10/201817:41:20Antes do acesso1
      Product 2315/10/201814:4515/10/201817:44:00Antes do acesso1

       

       

      Sorry anything here, first post.

       

      Thanks.