Page 1 of 2

Number

PostPosted: Sat Nov 27, 2021 9:13 am
by Vladislav1975
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")

Re: Number

PostPosted: Sat Nov 27, 2021 12:13 pm
by Flag_Hippo
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'), '-' )

Re: Number

PostPosted: Sat Nov 27, 2021 1:15 pm
by Vladislav1975
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.

Re: Number

PostPosted: Sat Nov 27, 2021 1:30 pm
by Flag_Hippo
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.

Re: Number

PostPosted: Sat Nov 27, 2021 1:42 pm
by Vladislav1975
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.

Re: Number

PostPosted: Sat Nov 27, 2021 2:04 pm
by Flag_Hippo
Do this then:

Code: Select all
sum(if[tourney_hand_player_statistics.id_hand = 5440, 1, 0])

Re: Number

PostPosted: Sat Nov 27, 2021 2:37 pm
by Vladislav1975
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

Re: Number

PostPosted: Sun Nov 28, 2021 5:51 am
by Flag_Hippo
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.

Re: Number

PostPosted: Sun Nov 28, 2021 8:55 am
by Vladislav1975
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.

Re: Number

PostPosted: Sun Nov 28, 2021 10:39 am
by Vladislav1975
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.

highfalutin