Page 1 of 1

Multiple questions about developing IsHero stat

PostPosted: Mon Feb 04, 2013 4:50 pm
by Ninja666
Hello, I am developing isHero stat and I face a lot of questions:

1) What is best way to do that? cash_hand_player_statistics.flg_hero is flag for imported hand. I want to be able to know if it is Active player (selected as Hero in PT4)
Currently I am comparing players search name with static text 'Hero_screenname'
2) Why if I will assign statistic it will not group report by that:

If I would play with created statistics then it would make:
hands/Hero
663 Opp
1256 Opp
52110 Hero
1233 Opp
...
But If I will map database field to statistics ( if[player_real.player_name_search = 'xxxxxxxxxxx', 1, 0])
It will work well:
Hands/Hero
52110 Hero
3000 Opp
(no more lines)

3) Why Case clause works in column tab, but doesn't work in Statistcs tab? How to use it there? Writting everything with If could be big pain :|

4) Forgot other questions ;( I will be back if I will remember those! But there was much more!

Re: Multiple questions about developing IsHero stat

PostPosted: Mon Feb 04, 2013 4:58 pm
by Ninja666
5) I want to filter on VPIP (stat definition is: (cnt_vpip / (cnt_hands - cnt_walks)) * 100)

But I can't use that stat (VPIP) in other statistic or column (in column that formula doesn't work), So I am forced to plug in the same formula in my current stat.
I also Can't use case close so how I will filter out o that? SHould I write something like this:

Code: Select all
If( cnt_vpip / (cnt_hands - cnt_walks)) * 100 > 15), '0-15vpip',
If( cnt_vpip / (cnt_hands - cnt_walks)) * 100 > 20), '15-20vpip',
If( cnt_vpip / (cnt_hands - cnt_walks)) * 100 > 30), '20-30vpip',
'30+vpip')))


Cmon- that looks freakish. And in my project I am going to use much more statistcs :((

Re: Multiple questions about developing IsHero stat

PostPosted: Mon Feb 04, 2013 5:06 pm
by kraada
(1) flg_hero is true when the player was dealt cards; there's nothing in the database for who is active right now, that's set at the report level.

(2) I'm not really sure what you're trying to do here; could you elaborate a little bit?

(3) Columns are the only things that actually use SQL to get data out of the database; Statistics just combine Columns together and make them pretty and deal with formatting and that kind of thing (which is why CASE statements aren't appropriate for Stats)

(4) Ask them when you remember them, no rush :)

(5) This is what Variables are for - you could assign a variable to "cnt_vpip / (cnt_hands - cnt_walks) * 100" (call it say var_vpip) and then that will clean that up considerably for you.

Re: Multiple questions about developing IsHero stat

PostPosted: Mon Feb 04, 2013 5:23 pm
by Ninja666
Thnx for quick answer!

kraada wrote:(1) flg_hero is true when the player was dealt cards; there's nothing in the database for who is active right now, that's set at the report level.

(2) I'm not really sure what you're trying to do here; could you elaborate a little bit?


When column is bound to database field:
Image
Result is:
Image
When column uses another column?:
Image
Then result is not grouped together:
Image

Re: Multiple questions about developing IsHero stat

PostPosted: Tue Feb 05, 2013 9:29 am
by kraada
The extra grouping is likely because the built in player name column has the group by box ticket - that means it groups the SQL by that value, breaking things down into multiple rows.

Re: Multiple questions about developing IsHero stat

PostPosted: Wed Feb 06, 2013 5:29 am
by Ninja666
kraada wrote:The extra grouping is likely because the built in player name column has the group by box ticket - that means it groups the SQL by that value, breaking things down into multiple rows.


Nope :) Actually it is opposite:) Group by Groups multiple rows into few :)

highfalutin