1 Reply Latest reply on Nov 28, 2018 5:48 AM by Eric Mayberry

    Count of Distinct Logins by Week HISTORICAL_EVENTS Postgres

    Eric Mayberry

      Hi All - I have tried unsuccessfully to create a view that shows the count of distinct users that have logged in the past week or month. I have tried several suggestions from multiple forum discussions, but can't quite get it to work. The closest I got was using Shawn Wallworks suggestion here. I couldn't reproduce his line chart though. See Chart 3 in the attached workbook. Everything appears to be the same as in the "5. View with flexable mark type" worksheet....but no nice graph.


      I am using the Postgres workgroup database and I have the historical_events joined to the historical_event_types (only pulling "Login" event) and joining in hist_users. I'm just looking for a sum # of users that logged in (distinct).


      Along with those 3 postgres tables, I was using the following:

      • [Moving CountD] measure - WINDOW_SUM([In Window])
      • [In Window] measure - WINDOW_MAX(SUM(1),1-[Window Length],0)
      • [Is First] measure (T/F) - FIRST()==0
      • [Window Length] parameter


      Shawn Wallwork