7 Replies Latest reply on Jan 15, 2019 2:25 PM by jeremiah.mercury

    dynamically calculated DAU/rolling-MAU over time


      Hi everyone —


      I've attached a sample workbook that uses the sample store data because it is similar in-kind to the data I'm really working with. In reality I have customer IDs, but I'm using Customer Name here just because it was in the sample data.


      I'm trying to calculate DAU/MAU and I know I need to use LOD, but all examples I've found of MAU aren't a rolling MAU, but calculated based on calendar month.


      I've got my DAU calculating just fine.


      For a rolling MAU I have a calculated field that is the order date - 28 and I'm attempting to use it in a LOD Rolling 28 calculated field but it's definitely not right because it ends up with the same number as DAU. I think because I'm trying to reference what I want to be a static piece of information (the 28 days ago date) inside the per-row calculations. I know how to accomplish what I need to do in a scripting language but am struggling to adapt that to Tableau lingo.


      Similar to this sample data, part of my trouble is that my data is individual transaction data, and so I can't rely on other suggestions I've seen like WINDOW calculations because the rows don't represent already calculated days. If I were to do an interim table that is the per-day calculations ready-to-go for a WINDOW calculation, I can't do the COUNTD across the entire 28 day time period because it's already been COUNTD'd at the day level.


      Quite a conundrum as I'm trying to represent the DAU/MAU value over time, calculated each day.


      Thanks for any help you can give!