Closed tommiekn closed 4 years ago
Not 100% sure, but try this:
'report_type' => 'group_by_relationship',
'relationship_name' => 'user',
'group_by_field' => 'name',
@PovilasKorop i have tried that already, it doesnt work cause group_by_relationship doesnt allow the grouping by date.
If i use your code i get a graph that shows the total number of requests for each user. I do need to show how many users have generated logs with a group by date concept.
So each day theres 2/3/4/5/x active users.
@tommiekn oh you want to group by user AND by date? No, we don't support that, sorry. Feel free to fork the package and add any functionality you need, our goal was to create a simple package for quick usage and basic use cases.
I have opened a pull request, its a very easy edit, updated the readme as well, feel free to explain it better:
Hi,
I am trying to create a chart that shows how many users are active in a log table, daily.
I have one table logs with an "user" column that refers to the user/id, trying to get the results like running a DISTINCT(user_id)
I was trying with something like this but it shows the total numbers of records for each day, not grouping it by user. (es. i have 100 transactions of 5 different users, now i get 100 but i would like to get 5).
Is it possible?