1 Reply Latest reply on Feb 21, 2016 1:19 PM by Shinichiro Murakami

    Dynamic counting and summing across dates

    Sho Fujiwara

      Hi,

       

      I have a dataset of orders broken down by Member and Date.

       

      Here's a view of the data I created in Tableau, with the values indicating the Order Value (I don't really care about the actual number here, just that an order was placed).

       

      For each Date value, I want to calculate the frequency of member orders over the four week period starting from the Date. The frequency of member orders would be calculated by something like count(Orders)/countd(Member) over the following four week span.

       

      So for example, for 1/1/16, countd(Member) = 4, and count(Orders) = 15, which is the number of distinct member and orders between 1/1/16 and 1/22/16.

       

      What I'm struggling with is creating a formula that will calculate the count(Orders)/countd(Member) over different 4 week spans for each Date.

       

      Any help would be greatly appreciated.

       

      Thanks,

      Sho