help creating my first stat

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

help creating my first stat

Postby pantik » Wed Sep 02, 2009 11:21 am

Hello all:

I am trying to create my first stat. I want to creat a stat than give me openraise from BU and CO am doing from RFI by positions which i have dowloaded from repositoy. I only am doing it for learn to create stats.

I have created these two columns:
cnt_p_open_opp_LP = sum(if[holdem_hand_player_statistics.flg_p_open_opp AND holdem_hand_player_statistics.position <2, 1, 0])
cnt_p_raise_first_in_LP = sum( if[holdem_hand_player_statistics.flg_p_first_raise AND holdem_hand_player_statistics.flg_p_open_opp AND holdem_hand_player_statistics.position <2, 1, 0])

after i create a stats:
RFI_LP = ( cnt_p_raise_first_in_LP / cnt_p_open_opp_LP ) *100
wtih format expression /%.2f (sama with the original RFI )

Correct ?

... i think it works for me but I cannot see x/y (times/oportunities) when i place the cursor over it as the other stats.

How could i get it ?

Thank you and Im sorry for my english.
pantik
 
Posts: 75
Joined: Sun Feb 03, 2008 4:45 pm

Re: help creating my first stat

Postby WhiteRider » Wed Sep 02, 2009 11:32 am

That looks pretty good.
Try taking the spaces out from just inside the brackets in the stat's Value Expression, and adding a space before 100. The exact format is quite picky..

RFI_LP = (cnt_p_raise_first_in_LP / cnt_p_open_opp_LP) * 100

If that doesn't make it work, export your stat and attach it to a Support ticket so that we can investigate.
(Note the support system isn't currently working but this is being worked on now so if you need to send us your stat please do try again later.)
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK

Re: help creating my first stat

Postby pantik » Wed Sep 02, 2009 12:35 pm

it already works for me although i dont know if the solution was what you said because it did not work until i rebuilded the cache.

Thank you!!!
pantik
 
Posts: 75
Joined: Sun Feb 03, 2008 4:45 pm

Re: help creating my first stat

Postby WhiteRider » Wed Sep 02, 2009 12:39 pm

Yes, the cache might have helped.
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