Page 1 of 1

Hours played weekly

PostPosted: Wed Apr 23, 2014 11:27 am
by HarrysBread
Hello,

I'm trying to create a report that displays the number of hands I play in cash games every week and the number of hours.
So far, what I have working is (in colums): month, nb hands, nb week, my c won, my c AI-adj.

I can't figure out how to show the number of hours that is played every week. I have tried using "Real Hours month" but as its name suggests it only displays the number of hours I've played in a month.

I know I can get the weekly number of hours played by changing the date filters but if I want to compare every week spanning several months then it would be quite tedious.

Can you help me make a stat that would show the number of hours played every week?

Image

Thanks!

Re: Hours played weekly

PostPosted: Wed Apr 23, 2014 12:04 pm
by kraada
There isn't a stat that groups hours played by week, so you'd need to build this as a custom stat. You'd need to make a new variable similar to the monthly one but using date_played_year_week instead of date_played_month.

Re: Hours played weekly

PostPosted: Wed Apr 23, 2014 12:25 pm
by HarrysBread
Ok,
So, I've duplicated "var_cnt_minutes_real_month" and called it "var_cnt_minutes_real_week".
I changed the content from "lookup_realminutes_month(id_player, date_played_month, date_played_year)" to "lookup_realminutes_month(id_player, date_played_year_week, date_played_year)"
Then, I've duplicated "Real Hours Month" and called it "Real Hours Week".

Image

But when I try to edit the report, the columns displays 0 and flashed in red the error message: "QE_token: cannot convert value to double"

Re: Hours played weekly

PostPosted: Wed Apr 23, 2014 1:20 pm
by kraada
A little more digging indicates that you need to build date_played_week rather than use date_played_year_week.

Give date_played_week this value expression, then use it in your variable:

dateextract_week[ datefix_fromutc[ cash_hand_player_statistics.date_played ]]

date_played_year_week also includes the year which isn't expected by the lookup function.

Re: Hours played weekly

PostPosted: Wed Apr 23, 2014 3:05 pm
by HarrysBread
Thanks for your help!