6 Replies Latest reply on Apr 27, 2017 11:44 AM by Dan Brewer

    Count Transactions within 90 days of each Other

    Dan Brewer

      I'm having trouble thinking of a how to solve a question I've been asked. What I need to identify is how many people have had 3 or more transactions within any 90 day period during a given time frame.


      For example, if someone has transactions on 1/14/2016, 2/14/2016 and 3/13/2016 then I will want to identify them.

      Another person may have transactions on 6/25/2016, 7/25/2016 and 10/1/2016 - I do not want to count them as their 3 transactions did not occur during a 90 day period.


      It does not matter what the first/last date is - only that 3 transactions occurred during 90 days, so using min/max functions doesn't seem like it will work. For example, if a user has a transactions on 1/25/2016, 3/25/2016, 5/25/2016, 6/10/2016, and 12/31/2016, I will want to count them. The first 3 transactions (1/25, 3/25, 5/25) do not include him because they did not happen within 90 days. The last 3 transactions (5/25, 6/10, 12/31) do not include him because they did not occur within 90 days. BUT, the middle transactions (3/25, 5/25, 6/10) will include him because they occurred within 90 days.


      Any help or clever solutions would be greatly appreciated.


      Thanks for any help,



      Version: Tableau Server 10.2

      Tableau Desktop: 10.2.1