Page 1 of 1

using a new column in another new column

PostPosted: Thu Jan 29, 2009 2:11 pm
by onaleeps
I wanted to create a new statistic which is: Percent of hands won after attempting a blind steal and defender didn't fold. So I first made a flag variable. I did this under the "Holdem Cash Hand" section name. The purpose of the flag was to flag hands in which a blind steal was attempted, but the defender didn't fold (he either called or raised). The variable was put in as a new column and it was called flg_steal_att_opp_nf. The expression to create it was:

if[holdem_hand_player_statistics.flg_steal_att AND (holdem_hand_player_statistics.flg_p_3bet_def_opp OR holdem_hand_player_statistics.flg_f_saw),1,0]

Then, I wanted to use my new flg_steal_att_opp_nf flag in the creation of another new column. This time, the new column was to go under "Holdem Cash Player Statistics" section name because it would be a count of all the times that a player attempted a steal but the defender didn't fold. I tried this expression:

sum(if[flg_steal_att_opp_nf,1,0])

That didn't work (I got an error in validating the expression).

So, I tried:

sum(if[holdem_hand_player_statistics.flg_steal_att_opp_nf,1,0])

That didn't work either. Can anybody give a hint as to how I can get the one column that I created under "Holdem Cash Hand" to be recognized when I'm creating another column under "Holdem Cash Player Statistics"?

Thank you,
onaleeps

Re: using a new column in another new column

PostPosted: Thu Jan 29, 2009 2:37 pm
by kraada
You can't cross the sections like that, I'm afraid.

What you'll want to do is create two columns in HCPS, one which counts all the times a player attempted to steal and were called, and the times they did that and won at showdown.

In the HCPS section:

cnt_steal_att_opp_no_instafold

sum(if[holdem_hand_player_statistics.flg_steal_att AND(holdem_hand_player_statistics.flg_p_3bet_def_opp OR holdem_hand_player_statsitics.flg_f_saw), 1, 0])

This one you pretty much had already.

Then:

cnt_steal_att_opp_no_instafold_win_showdown:

sum(if[holdem_hand_player_statistics.flg_steal_att AND(holdem_hand_player_statistics.flg_p_3bet_def_opp OR holdem_hand_player_statsitics.flg_f_saw) AND holdem_hand_player_statistics.flg_won_hand AND holdem_hand_player_statsitics.flg_showdown, 1, 0])

Put the latter over the former and multiply by 100 to get a percent in the stat's definition and you're good to go.

Re: using a new column in another new column

PostPosted: Thu Jan 29, 2009 4:27 pm
by onaleeps
Wow. That's great! Thank you!

Re: using a new column in another new column

PostPosted: Thu Jan 29, 2009 4:58 pm
by kraada
You're welcome; enjoy :)