Report Rows?

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

Report Rows?

Postby Zangeeph » Sat Jan 28, 2012 9:34 am

How do I change what makes a new row in a report? Right now, if I run a report, it will always seem to make a new row for each player no matter which stats I select in Report Stats. How would I make it so that instead of doing it for a new player, it would do it for another stat such as VPIP?

For example, there would be a rows with VPIP 30 to 34, 35 to 39, 40 to 44 etc and the corresponding stats for each of those. Also, I was thinking about using a formula to do this rather than making a new column for each 30 to 34, 35 to 39, 40 to 44 etc. Like rounding the VPIP to the nearest of 32, 37, 42 etc. So the result of this is that instead of checking if the name is the same then if its the same add the stats to the same row, it would instead check if the rounded VPIP value is the same and if its the same add the stats to the same row.
Zangeeph
 
Posts: 205
Joined: Thu Jun 23, 2011 6:27 pm

Re: Report Rows?

Postby WhiteRider » Sat Jan 28, 2012 2:24 pm

To do that you would need to make a new custom stat for your VPIP range.
e.g. If you Duplicate the VPIP stat and change the Value Expression to multiply by 10 instead of 100 then you'll get 10 gradations. You'd also need to change the Format Expression to:
/%.0f
..so that the number was displayed as a whole number, otherwise it will still be split up a lot.
If you then add your new stat to a report and remove the player name it should split the report into 10 rows. I'm not sure this will work exactly as you envisage, though - you might get odd results.
If you want specific ranges you'd need to write a more complex expression, of course.
If you can't get it working right please post back and we'll look at it further.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Report Rows?

Postby Zangeeph » Sun Jan 29, 2012 7:52 am

I tried using the % operator but it's not working. I wanted to use the following: (cnt_vpip / cnt_hands)*100-((cnt_vpip / cnt_hands)*100) % 4. It says it's not valid but it is valid when I replace the "%" with a "/". So is there no way to use the modulo operator in Statistics? I used the same expression in columns and it worked fine. It seems strange to not let people use basic mathematics in the Statistics.
Zangeeph
 
Posts: 205
Joined: Thu Jun 23, 2011 6:27 pm

Re: Report Rows?

Postby Zangeeph » Sun Jan 29, 2012 8:36 am

I figured out why it was always splitting the rows by players. I had forgotten I had a filter on "#Player# != 'isildur1'. When I removed that filter expression, the rows stopped splitting by player.

I created a new column VPIP rounded which uses the expression (cnt_vpip / cnt_hands)*100-((cnt_vpip / cnt_hands)*100) % 4. When I run it there's only 1 row of VPIP value of 36. I want it to make a row for VPIP of 0, 4, 8, 12... 100. Is it possible to do this without making a ridiculous amount of new columns?
Zangeeph
 
Posts: 205
Joined: Thu Jun 23, 2011 6:27 pm

Re: Report Rows?

Postby Zangeeph » Sun Jan 29, 2012 12:12 pm

I had an idea! Since using the filter expression #Player#!='Name' makes the report do a new row for each player, I would need to use an expression like #VP$IProunded#!=999 so that it would make a new row for each of the VP$IProunded values. Sadly, that particular expression doesn't work.
Zangeeph
 
Posts: 205
Joined: Thu Jun 23, 2011 6:27 pm

Re: Report Rows?

Postby WhiteRider » Mon Jan 30, 2012 4:42 am

Having the player stat in your filters would cause it to split the report, but if a stat is already in the report then it won't need to be in a filter to enable splitting.
Thinking about it again I'm not sure whether just making a new stat like that will actually split the report - you may need to make new columns using the "Group By" option. I'm not sure exactly how we'd do this just now but Kraada or I will investigate when we have some time.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: Report Rows?

Postby Zangeeph » Mon Jan 30, 2012 3:06 pm

It is no longer a problem, I have solved my issues. I have gained from this experience. Hopefully, Pokertracker 4 will allow me to do more with my database. Still haven't quite figured out why some expressions are not valid though (using % isn't allowed?) but it doesn't matter.
Zangeeph
 
Posts: 205
Joined: Thu Jun 23, 2011 6:27 pm

Re: Report Rows?

Postby kraada » Mon Jan 30, 2012 4:12 pm

% isn't valid within statistics as we haven't added it. You can use it within column definitions though.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 0 guests