Number

Discuss how to create custom stats, reports and HUD profiles and share your creations.

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Number

Postby Vladislav1975 » Sat Nov 27, 2021 9:13 am

I created a column using the "count ( expr )" function from Pokertracker:
"count( tourney_hand_player_statistics.id_hand = 5440 )
"
I created a statistical indicator only from this column.

Why, when displaying this static indicator in hud, it shows the total number of hands per player and not " 1"?
(The player exactly has a hand with such an id_hand;
Must have value = "1")
Vladislav1975
 
Posts: 19
Joined: Fri Nov 01, 2013 6:54 pm

Re: Number

Postby Flag_Hippo » Sat Nov 27, 2021 12:13 pm

If a player has an id_hand of 5440 then that would mean they have played 5440 hands or more so you want the HUD to display '1' when that is the case? To do that duplicate the existing 'Hands' statistic, change the 'Format Type:' to 'Expression' and use this:

Code: Select all
if(this >= 5440, format('1'), '-' )
Flag_Hippo
Moderator
 
Posts: 14440
Joined: Tue Jan 31, 2012 7:50 am

Re: Number

Postby Vladislav1975 » Sat Nov 27, 2021 1:15 pm

Flag_Hippo wrote:If a player has an id_hand of 5440 then that would mean they have played 5440 hands or more so you want the HUD to display '1' when that is the case? To do that duplicate the existing 'Hands' statistic, change the 'Format Type:' to 'Expression' and use this:

Code: Select all
if(this >= 5440, format('1'), '-' )

:D , If a player has an id_hand of 5440, it will not mean that he has played 5440 hands or more. I have only 648 hands for this player, and at the same time I have a hand with the given id_hand = 5440. I have hands on this player with a large id_hand value. You didn't write about it at all.
Vladislav1975
 
Posts: 19
Joined: Fri Nov 01, 2013 6:54 pm

Re: Number

Postby Flag_Hippo » Sat Nov 27, 2021 1:30 pm

Apologies for the misunderstanding and you are right with regards to that however id_hand is a grouping statistic so it is not going to work in the HUD (see the eighth exception listed here) and unfortunately I don't have any SQL for what you are trying to do here but if a PostgreSQL expert sees this question hopefully they can offer some advice.
Flag_Hippo
Moderator
 
Posts: 14440
Joined: Tue Jan 31, 2012 7:50 am

Re: Number

Postby Vladislav1975 » Sat Nov 27, 2021 1:42 pm

Flag_Hippo wrote:Apologies for the misunderstanding and you are right with regards to that however id_hand is a grouping statistic so it is not going to work in the HUD (see the eighth exception listed here) and unfortunately I don't have any SQL for what you are trying to do here but if a PostgreSQL expert sees this question hopefully they can offer some advice.


Why does id_hand not work in HUD?! There
is a regular statistical indicator "Hands Abbreviated" and its column is calculated as: cnt_hands = sum(if[tourney_hand_player_statistics.id_hand > 0, 1, 0]).
The hud displays its value perfectly.
Vladislav1975
 
Posts: 19
Joined: Fri Nov 01, 2013 6:54 pm

Re: Number

Postby Flag_Hippo » Sat Nov 27, 2021 2:04 pm

Do this then:

Code: Select all
sum(if[tourney_hand_player_statistics.id_hand = 5440, 1, 0])
Flag_Hippo
Moderator
 
Posts: 14440
Joined: Tue Jan 31, 2012 7:50 am

Re: Number

Postby Vladislav1975 » Sat Nov 27, 2021 2:37 pm

Vladislav1975 wrote:I created a column using the "count ( expr )" function from Pokertracker:
"count( tourney_hand_player_statistics.id_hand = 5440 )
"
I created a statistical indicator only from this column.

Why, when displaying this static indicator in hud, it shows the total number of hands per player and not " 1"?
(The player exactly has a hand with such an id_hand;
Must have value = "1")


:). Initially I had another question :) . See above
Vladislav1975
 
Posts: 19
Joined: Fri Nov 01, 2013 6:54 pm

Re: Number

Postby Flag_Hippo » Sun Nov 28, 2021 5:51 am

I don't know why that is since I am not familiar with the COUNT function in PostgreSQL but if I find out anything about that I'll let you know.
Flag_Hippo
Moderator
 
Posts: 14440
Joined: Tue Jan 31, 2012 7:50 am

Re: Number

Postby Vladislav1975 » Sun Nov 28, 2021 8:55 am

Flag_Hippo wrote:I don't know why that is since I am not familiar with the COUNT function in PostgreSQL but if I find out anything about that I'll let you know.

So we are talking about the COUNT function in pokertracker :). Thanks.
Vladislav1975
 
Posts: 19
Joined: Fri Nov 01, 2013 6:54 pm

Re: Number

Postby Vladislav1975 » Sun Nov 28, 2021 10:39 am

Vladislav1975 wrote:
Flag_Hippo wrote:I don't know why that is since I am not familiar with the COUNT function in PostgreSQL but if I find out anything about that I'll let you know.

So we are talking about the COUNT function in pokertracker :). Thanks.



This function is included in the list of available in Pokertracker ("Insert" - > "Functions" -> Function name - "Count", Expression - "count(exp)") when creating a column.
Vladislav1975
 
Posts: 19
Joined: Fri Nov 01, 2013 6:54 pm

Next

Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 20 guests

cron