1 Reply Latest reply on Dec 21, 2012 11:18 AM by Sean Mullane

    How can i count distinct IDs in last 30 days?

    youzun.zhang.0

      I wish to find out the Monthly Active User of our game from database.

      For example, like the data below, how can i count distinct IDs for last 30 days and showing the end of 30 day's date?

      also keep rolling day by day?

       

      DateIDs
      01/01/2012a
      01/01/2012b
      01/01/2012c
      01/01/2012d
      01/01/2012e
      01/01/2012f
      01/01/2012g
      02/01/2012a
      02/01/2012d
      02/01/2012e
      02/01/2012f
      02/01/2012h
      02/01/2012t
      02/01/2012y
      02/01/2012z
      02/01/2012x
      02/01/2012i
      03/01/2012m
      03/01/2012q
      03/01/2012w
      03/01/2012a
      03/01/2012d
      03/01/2012e
      03/01/2012c
      03/01/2012t
      03/01/2012z
      03/01/2012y
      01/02/2012a
      01/02/2012r
      01/02/2012d
      01/02/2012b
      01/02/2012c
      01/02/2012d
      01/02/2012s
      01/02/2012e
      01/02/2012t
      01/02/2012y

       

      Cheers!

        • 1. Re: How can i count distinct IDs in last 30 days?
          Sean Mullane

          One way you can do it is set a Relative Date filter for "last 30 days", and Anchor Relative to: Today. Once you do that you can just do a count-distinct on the user IDs.

           

          That should be all that's needed, though you may need to be mindful of what time your data extract updates if you're using one. I would think closer to midnight would be best. Otherwise you could add few hours uniformly to all your datetimes to change the day-to-day changeover time to be as close to your daily update time as possible... if you really need that level of precision. Otherwise just ignore this second paragraph