How do I create a stat the calculates hourly per year?

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

How do I create a stat the calculates hourly per year?

Postby pokertrackfan77 » Fri Feb 17, 2023 1:23 am

I'm looking to create 2 stats for a custom report to summarize a year.
1) Total hours in a year
2) Hourly per year

Currently, I was able to figure out how to derive a Year stat by duplicating the Month stat.
But now I'm trying to figure out how to get total hours in a year. I thought Session Hours would help, but it seems to be too busy of a query to populate results in a short and reasonable amount of time.

I've seen that there are My Currency per [time unit] stats. (time unit whether it is hour, date, month, but no year)
This is the definition for My currency per month: amt_won_curr_conv / (var_cnt_minutes_real_month / 60)
I thought it would be a simple swap of "month" for the word "year", but that is not a valid expression.

I was hoping once i got this, i would be able to calculate hourly by doing My Currency Won/Total hours in a year (once i figured out how to do it).

Could I please receive some advice on how i can get those two stats for my year summary report?

Thanks
pokertrackfan77
 
Posts: 22
Joined: Mon Sep 02, 2019 2:05 pm

Re: How do I create a stat the calculates hourly per year?

Postby Flag_Hippo » Fri Feb 17, 2023 1:25 pm

I don't know if something like that is possible with the current database schema but you can use the monthly statistics and then filter for a specific year separately to get the hours/hourly rate for each year from the summary line.
Flag_Hippo
Moderator
 
Posts: 14510
Joined: Tue Jan 31, 2012 7:50 am

Re: How do I create a stat the calculates hourly per year?

Postby pokertrackfan77 » Sat Feb 18, 2023 12:07 am

Flag_Hippo wrote:I don't know if something like that is possible with the current database schema but you can use the monthly statistics and then filter for a specific year separately to get the hours/hourly rate for each year from the summary line.


Ok i see, if i did it the way you suggest, i can see that the summary line at the bottom would add up the hours. But would that be a correct hourly? I assume that would be the average of all the hourly's per month?
Like wouldn't that be:
(mean(jan) + mean (feb) + mean(march) ... mean(dec))/12

as opposed to:
(total amount won)/(total hours played in the year)

I see if it's not possible, i'll just do a hand calculation that way.

Thanks
pokertrackfan77
 
Posts: 22
Joined: Mon Sep 02, 2019 2:05 pm

Re: How do I create a stat the calculates hourly per year?

Postby Flag_Hippo » Sat Feb 18, 2023 5:56 am

pokertrackfan77 wrote:But would that be a correct hourly?

Yes.
pokertrackfan77 wrote:I assume that would be the average of all the hourly's per month?
Like wouldn't that be:
(mean(jan) + mean (feb) + mean(march) ... mean(dec))/12

No. It will be calculated as a weighted average so the imbalance of hours between each month would be accounted for.
Flag_Hippo
Moderator
 
Posts: 14510
Joined: Tue Jan 31, 2012 7:50 am


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 29 guests

cron