Averages from logon data

  • Hi Folks,

    I've introcuded a new environment variable to my clients, lets call it %LOGONTIME% with a value that changes and appends each time a user logs on. It looks a bit like this:

    First logon: LOGONTIME=(10) 78,

    Second logon: LOGONTIME=(10) 78,(10) 102,

    Third Logon: LOGONTIME=(10) 78,(10) 102,(11) 1011,

    etc. etc. where the (10) & (11) are the month and the numbers after the space are time taken to logon that day, and the commas used as delimiters for my logon script to update the variable properly.

    I'm looking for guidance on how best to collate this data into monthly reports, both on a per user basis and an overall view of the entire user base, so I can have Novembers logon average shown for the entire user base in a report and also a breakdown of the users individual logon averages for each month.

    Any Pointers would be appreciated.

    Cheers

    J

  • jb-1079038 (11/25/2009)


    etc. etc. where the (10) & (11) are the month and the numbers after the space are time taken to logon that day, and the commas used as delimiters for my logon script to update the variable properly.

    I'm looking for guidance on how best to collate this data into monthly reports, both on a per user basis and an overall view of the entire user base, so I can have Novembers logon average shown for the entire user base in a report and also a breakdown of the users individual logon averages for each month.

    J

    To me it's not really clear what you're looking for...

    How would you calculate the "time taken to logon that day", if you'd display the data on a monthly base?

    What exactly are you looking for: number of logons over a period of time or logon time?

    Do you already have the logon data and are you just looking for a way to get the data in a list format as described?



    Lutz
    A pessimist is an optimist with experience.

    How to get fast answers to your question[/url]
    How to post performance related questions[/url]
    Links for Tally Table [/url] , Cross Tabs [/url] and Dynamic Cross Tabs [/url], Delimited Split Function[/url]

  • jb-1079038 (11/25/2009)


    Hi Folks,

    I've introcuded a new environment variable to my clients, lets call it %LOGONTIME% with a value that changes and appends each time a user logs on. It looks a bit like this:

    First logon: LOGONTIME=(10) 78,

    Second logon: LOGONTIME=(10) 78,(10) 102,

    Third Logon: LOGONTIME=(10) 78,(10) 102,(11) 1011,

    etc. etc. where the (10) & (11) are the month and the numbers after the space are time taken to logon that day, and the commas used as delimiters for my logon script to update the variable properly.

    I'm looking for guidance on how best to collate this data into monthly reports, both on a per user basis and an overall view of the entire user base, so I can have Novembers logon average shown for the entire user base in a report and also a breakdown of the users individual logon averages for each month.

    Any Pointers would be appreciated.

    Cheers

    J

    I guess I'm not positive on what you mean by environment variable. Are you going to be storing this information in a data table? It doesn't sound like you are, but if you're not then I'm confused as to why you'd post the question on a database forum.

    If you are storing this in a table (at some point), then read on. If not, then I'm with Lutz... what are you asking for?

    First of all, you would make your life about a million times easier if you would normalize that data somewhat. Unfortunately there's not enough information about your environment for me to come up with a full table design, but here's the gist of it.

    Consider a table like this:

    UserID (whatever datatype you can use to identify your users)

    Date datetime

    TimeToLogin int

    Then, each time a user logs in, you add another row to the table. It might *seem* like overkill because you'll end up with a lot more rows than doing it your way, but trust me, when it comes time to report on that data, you'll be thankful.

    Seth Phelabaum


    Consistency is only a virtue if you're not a screwup. 😉

    Links: How to Post Sample Data[/url] :: Running Totals[/url] :: Tally Table[/url] :: Cross Tabs/Pivots[/url] :: String Concatenation[/url]

Viewing 3 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply