Trying to filter report by BB ranges (<3, 3-4, 4-5 etc)

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

Trying to filter report by BB ranges (<3, 3-4, 4-5 etc)

Postby lunatunez » Tue Oct 05, 2010 1:18 pm

I've been trying to setup a report that shows me various opp stats grouped by a column that is a range of bb

ex:
BB range/VPIP/PFR/etc
<3/ / / /
3-4////
4-5////

My first attempt was to put in a filter #Stack BB#>=3 and #Stack BB#<=4 to help with the in-between ranges but when I run the report nothing shows. For the 'below 3bb' filter, that seems to work though.

I saw from another post that someone was trying to do a column for M zones, should I do this instead?

if [ tourney_holdem_blinds.amt_bb <= 200, 'Early', if [tourney_holdem_blinds.amt_bb <= 1000, 'Middle', 'Late' ] ]

Except that I am looking for these ranges: <3, 3-4, 4-5, 5-6, 6-8, 9-10, 10-15, 15-20, 20-30.

I've haven't built a column (or really understand them) yet, so any hints are greatly appreciated!!
lunatunez
 
Posts: 8
Joined: Fri Feb 19, 2010 5:59 pm

Re: Trying to filter report by BB ranges (<3, 3-4, 4-5 etc)

Postby kraada » Tue Oct 05, 2010 2:14 pm

The best way to do this is to create a custom statistic that groups by your ranges.

On the Columns tab when you create a column there's a small checkbox "Group By" - when that is checked, the resulting stat will be used to group rows in reports. So in this case you want to create a column that gives a single value for each stack size in your range, and then use it in a custom statistic to do grouping by.

For example:

if[tourney_holdem_hand_player_detail.amt_before / tourney_holdem_blinds.amt_bb <= 3, 1, if[tourney_holdem_hand_player_detail.amt_before / tourney_holdem_blinds.amt_bb <= 4, 2, 3]]

That column - when grouped by and used in a statistic - would break things down into three rows: (1) where the player had less than or equal to 3BB in his stack at the start, (2) where the player had 3 to 4 BB in his stack, and (3) everything else.

You obviously want to add more rows, but with this setup it shouldn't be hard for you to do so.

In the stat on the format tab you probably want to also do something like:

if(column_name = 1, format('< 3 BBs'), if(column_name = 2, format('3-4BBs'), format('4+ BBs')))

where column_name is whatever you name the column. That way you can get the text you want to see and don't have to remember what the value 2 actually means :)
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Trying to filter report by BB ranges (<3, 3-4, 4-5 etc)

Postby lunatunez » Tue Oct 05, 2010 3:28 pm

Wow, I hope I can get this to work. Here is what I got so far:

if[tourney_holdem_hand_player_detail.amt_before / tourney_holdem_blinds.amt_bb <= 3, 1, if[tourney_holdem_hand_player_detail.amt_before / tourney_holdem_blinds.amt_bb <= 4, 2, if
[tourney_holdem_hand_player_detail.amt_before / tourney_holdem_blinds.amt_bb <= 5, 3, if[tourney_holdem_hand_player_detail.amt_before / tourney_holdem_blinds.amt_bb <= 6, 4, if
[tourney_holdem_hand_player_detail.amt_before / tourney_holdem_blinds.amt_bb <= 8, 5, if[tourney_holdem_hand_player_detail.amt_before / tourney_holdem_blinds.amt_bb <= 10, 6, if
[tourney_holdem_hand_player_detail.amt_before / tourney_holdem_blinds.amt_bb <= 12, 7, if[tourney_holdem_hand_player_detail.amt_before / tourney_holdem_blinds.amt_bb <= 15, 8, 9]]]]]]]]


Ok, now I succeeded in plugging it into a column: BB_Range_Groups

And I have your adjusted naming bit to:

if(BB_Range_Groups = 1, format('< 3 BBs'), if(BB_Range_Groups = 2, format('3-4BBs'), if(BB_Range_Groups = 3, format('4-5BBs'), if(BB_Range_Groups = 4, format('5-6BBs'), if(BB_Range_Groups = 5, format('6-8BBs'), if(BB_Range_Groups = 6, format('8-10BBs'), if(BB_Range_Groups = 7, format('10-12BBs'), if(BB_Range_Groups = 8, format('12-15BBs'), if(BB_Range_Groups = 9, format('15+BBs'), )))))))))

I created another statistic under the Format Tab called BB Ranges with the above pasted in and it validated fine.


How do I use this now? I tried putting it into the report stats and a bunch of red error code showed up....

The stats I'm listing are (BBRanges / Player / PFR / 3betPF / PFR&f3bet / F2fcbet / F2fdonk / Call PFR / BBvsSBcall / VPIPSB / Limpfold / LimpCall)



Thank you again for your help!
Erik
lunatunez
 
Posts: 8
Joined: Fri Feb 19, 2010 5:59 pm

Re: Trying to filter report by BB ranges (<3, 3-4, 4-5 etc)

Postby kraada » Tue Oct 05, 2010 5:33 pm

You cannot leave a space between if and [, it won't work properly then.

So it should be:
if[tourney_holdem_hand_player_detail.amt_before / tourney_holdem_blinds.amt_bb <= 3, 1, if[tourney_holdem_hand_player_detail.amt_before / tourney_holdem_blinds.amt_bb <= 4, 2, if[tourney_holdem_hand_player_detail.amt_before / tourney_holdem_blinds.amt_bb <= 5, 3, if[tourney_holdem_hand_player_detail.amt_before / tourney_holdem_blinds.amt_bb <= 6, 4, if[tourney_holdem_hand_player_detail.amt_before / tourney_holdem_blinds.amt_bb <= 8, 5, if[tourney_holdem_hand_player_detail.amt_before / tourney_holdem_blinds.amt_bb <= 10, 6, if[tourney_holdem_hand_player_detail.amt_before / tourney_holdem_blinds.amt_bb <= 12, 7, if[tourney_holdem_hand_player_detail.amt_before / tourney_holdem_blinds.amt_bb <= 15, 8, 9]]]]]]]]

Yes, I know that's annoying :)

You also need to have a final something in the last "else" of your Format tab's if(). This will work:

if(BB_Range_Groups = 1, format('< 3 BBs'), if(BB_Range_Groups = 2, format('3-4BBs'), if(BB_Range_Groups = 3, format('4-5BBs'), if(BB_Range_Groups = 4, format('5-6BBs'), if(BB_Range_Groups = 5, format('6-8BBs'), if(BB_Range_Groups = 6, format('8-10BBs'), if(BB_Range_Groups = 7, format('10-12BBs'), if(BB_Range_Groups = 8, format('12-15BBs'), if(BB_Range_Groups = 9, format('15+BBs'), format('Error'))))))))))
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Trying to filter report by BB ranges (<3, 3-4, 4-5 etc)

Postby lunatunez » Wed Oct 06, 2010 8:51 am

Ok, got the column and statistic working - however it isn't displaying the way I thought it would for multiple players. For my own individual stats it looks great though!

it seems to be showing me multiple rows (for each player) for each blind range....

How to I get it to display a total for each range level?

I'll take a stab and guess that I have to use a 'sort' function similar to whats in the Blinds stat?


This has been quite a learning experience so far, thanks again for the great help =)
lunatunez
 
Posts: 8
Joined: Fri Feb 19, 2010 5:59 pm

Re: Trying to filter report by BB ranges (<3, 3-4, 4-5 etc)

Postby kraada » Wed Oct 06, 2010 9:43 am

If you remove the Player stat it will show totals for the levels only. If you want your own stats not to be part of that, you can use the filters to filter out yourself as a player.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Trying to filter report by BB ranges (<3, 3-4, 4-5 etc)

Postby lunatunez » Wed Oct 06, 2010 10:09 am

Yeah I tried removing players stat, and I have #Player# != 'my_username' to filter myself out. Also thought the Hands played stat was causing it too but removing that had same result.

I'll attach a screen shot of what I'm seeing...

http://i67.photobucket.com/albums/h291/lunatunez/pt3scrnshotcopy.jpg
lunatunez
 
Posts: 8
Joined: Fri Feb 19, 2010 5:59 pm

Re: Trying to filter report by BB ranges (<3, 3-4, 4-5 etc)

Postby kraada » Wed Oct 06, 2010 12:17 pm

What do you have as the Summary type for that column? Try making it Count Unique and see if that helps.
kraada
Moderator
 
Posts: 54430
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Trying to filter report by BB ranges (<3, 3-4, 4-5 etc)

Postby lunatunez » Wed Oct 06, 2010 6:03 pm

Tried that too, no luck. Sorry I thought this would be relatively simple but it's definitely more complex than I thought.

I also tried going back to the original 3 group formulas you gave me but they display the stats in the same fashion..

For now my quick fix was to simply put a filter in that says #BB Ranges#=1(or 2,3 etc) to narrow down the ranges, but that is quite time consuming.

Any other ideas?
lunatunez
 
Posts: 8
Joined: Fri Feb 19, 2010 5:59 pm

Re: Trying to filter report by BB ranges (<3, 3-4, 4-5 etc)

Postby WhiteRider » Thu Oct 07, 2010 2:51 am

Do you have "Group By" ticked in your new column?
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Next

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

Who is online

Users browsing this forum: No registered users and 3 guests