Page 1 of 1

Custom stat does not work in HUD but works on reports

PostPosted: Tue Dec 24, 2024 7:20 am
by Skywa
Hello,
I have build a custom stat to count the number of tourney that player has ended playing againts the hero in HU.
I can not use the number of tourneys because player may have busted early, and I want to count only when HU occurs.

I have made this stat:
Code: Select all
(amt_expected_won_hu_sphu / (cnt_finish_2 + cnt_finish_1 ))


Custom column:
amt_expected_won_hu_sphu:
Code: Select all
sum(if[tourney_hand_player_statistics.cnt_players=2,
tourney_hand_player_statistics.amt_expected_won,0])


Buil-in column:
cnt_finish_1
Code: Select all
sum(if[tourney_results.val_finish=1, 1,0])

cnt_finish_2
Code: Select all
sum(if[tourney_results.val_finish=2, 1,0])


The stat can not be added to a HUD (it does not show on the list of stats to add), but works fine in players reports.
If i try to trick with a custom colum like this
Code: Select all
sum(if[tourney_results.id_tourney > 0 AND ( tourney_results.val_finish=1 OR tourney_results.val_finish=2 )  , 1, 0])
instead of using the built-ins I have a SQL error:
column "tourney_results.id_tourney" must appear in the GROUP BY clause or be used in an aggregate function


I'am scratching my head on this, is it possible?

Re: Custom stat does not work in HUD but works on reports

PostPosted: Tue Dec 24, 2024 9:14 am
by Flag_Hippo
Unfortunately statistics which are based on session/tournament information cannot be used in the HUD.