Multiple questions about developing IsHero stat

Discuss and learn how to use TableTracker for table selection and NoteTracker for taking automated notes.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Multiple questions about developing IsHero stat

Postby Ninja666 » Mon Feb 04, 2013 4:50 pm

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!
Ninja666
 
Posts: 124
Joined: Mon Dec 19, 2011 6:10 pm

Re: Multiple questions about developing IsHero stat

Postby Ninja666 » Mon Feb 04, 2013 4:58 pm

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 :((
Ninja666
 
Posts: 124
Joined: Mon Dec 19, 2011 6:10 pm

Re: Multiple questions about developing IsHero stat

Postby kraada » Mon Feb 04, 2013 5:06 pm

(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.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Multiple questions about developing IsHero stat

Postby Ninja666 » Mon Feb 04, 2013 5:23 pm

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
Ninja666
 
Posts: 124
Joined: Mon Dec 19, 2011 6:10 pm

Re: Multiple questions about developing IsHero stat

Postby kraada » Tue Feb 05, 2013 9:29 am

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.
kraada
Moderator
 
Posts: 54431
Joined: Wed Mar 05, 2008 2:32 am
Location: NY

Re: Multiple questions about developing IsHero stat

Postby Ninja666 » Wed Feb 06, 2013 5:29 am

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 :)
Ninja666
 
Posts: 124
Joined: Mon Dec 19, 2011 6:10 pm


Return to TableTracker & NoteTracker

Who is online

Users browsing this forum: No registered users and 15 guests

cron