2 Replies Latest reply on Aug 27, 2017 9:01 AM by Eze Nwa

    Number of transactions

    Eze Nwa

      Hello Tableau experts,

      I really need some help please! I have a sample data set on horse betting in the table below which I'm trying to analyze

       

       

      The data set has a fictitious customer name, Horse, Date and Time of transaction. I would like to use Tableau to calculate the fields in bold and I have provided the answers I'm expecting.

      1. What is the number of days between the last and the previous transaction (Days_Diff)?
      2. What is the Time Diff (seconds) between the last and previous transaction?
      3. How many transactions has the specific customer executed in the last minute (COUNT_1 min), 5 mins (COUNT_5 min) and 24 hrs (COUNT_24 hrs), respectively.?
      4. How many different horses has the specific customer placed bet on, in the last 24 hrs (COUNT_horses 24 hrs)?

       

      I will so much appreciate your help with this! I'm using Tableau 10.2

       

              

      IDNameHorseDateTime (hh:mm:ss)Days Diff, if not same dayTime diff (seconds), if same dayCOUNT_1 minCOUNT_5 minCOUNT_24 hrsCOUNT_Horses 24 hrs
      1JohnHorse128/11/201611:10:011111
      2JohnHorse228/11/201611:10:02012222
      3KimHorse119/12/201610:12:461111
      4KimHorse231/12/201611:04:17121111
      5KimHorse301/02/201710:43:08321111
      6LisaHorse107/02/201715:43:531111
      7LucyHorse228/11/201611:26:021111
      8LucyHorse128/11/201611:37:0106591122
      9LucyHorse228/11/201611:40:3402131132
      10PeterHorse223/07/201611:34:531111
      11PeterHorse123/07/201611:36:4201091222
      12PeterHorse323/07/201611:37:140322333
      13PeterHorse323/07/201611:39:5101571443
      15SimonHorse108/11/201610:56:251111
      16SimonHorse218/11/201616:59:3410217891111
      17SimonHorse318/11/201617:41:47025331122

       

       

      Thank you very much in advance,

      Eze

       

      Message was edited by: Eze Nwa Thanks Tom, I have just uploaded a packaged workbook indicating what I'm trying to do. Thank you very much! Eze