My first attempt at customizing stats

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

My first attempt at customizing stats

Postby recooke » Sun Jan 10, 2010 6:48 pm

The "BB Won" stat produces a result based on "Big Bets" which is a limit poker concept. I play NLH exclusively. I want to create reports where the results are based on units as a multiple of the "Big Blind". An example would be amount bet on the flop. I don't want to see dollar amounts, I want to see units bet as a multiple of the big blind. That way I can create a report that express all the amounts in terms of multiples of the big blind. So whether I am playing at the $5/$10 NLH level or the $1/$2 NLH level, the report results will be comparable. Here is an example:
Game $5/$10 NLH: Bet $100 on flop = 10 BB's as defined by me to be 10 big blinds.
Game $1/$2 NLH: Bet $20 on flop = 10 BB's as defined by me to be 10 big blinds.
So even though I bet $100 in the $5/$10 NLH game and only $20 in the $1/$2 NLH game, I bet the same amount expressed in terms of big blind units (i.e. 10 big blinds in both cases).

So to start with I tried to modify the "BB Won" stat. So I went into the Configure Stats window to the Statistics Tab for the Holdem Cash Hand section. I clicked on the "BB Won" Stat and then the "Dup" button. I renamed the new stat "BB Won (My)".
After saving the new stat, I then found it and clicked on it so as to change the Expression Value on the Definition Tab. I changed the Expression Value to read: amt_bb_won * 2 (I then validated the expression and it came back as "ok").
I then saved the expression and clicked on "Apply" and exited. I now go back to my report I am creating and the new state appears there. So I click on it to add it to my report. But when I run the report, I get the same result as the old "BB Won" stat produced. How come the result isn't twice the old amount? What am I doing wrong?

Once I figure out how to modify the stat correctly, then I will go in and create new stats for all the other stats I wish to modify.
Thanks for your help.
recooke
 
Posts: 32
Joined: Sun Nov 15, 2009 11:46 am

Re: My first attempt at customizing stats

Postby WhiteRider » Mon Jan 11, 2010 5:15 am

The problem is that the Format Expression also includes amt_bb_won in this case:
format_number(amt_bb_won, 2, true, true)

You need to add your multiplier there too.

(As an alternative you could change the expression to the standard:
/%.2f
..but then you would lose the red/green colouring.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


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

Who is online

Users browsing this forum: No registered users and 0 guests