Custom stat does not work in HUD but works on reports

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

Moderators: WhiteRider, kraada, Flag_Hippo, morny, Moderators

Custom stat does not work in HUD but works on reports

Postby Skywa » Tue Dec 24, 2024 7:20 am

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?
Skywa
 
Posts: 4
Joined: Thu Jun 20, 2024 9:45 am

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

Postby Flag_Hippo » Tue Dec 24, 2024 9:14 am

Unfortunately statistics which are based on session/tournament information cannot be used in the HUD.
Flag_Hippo
Moderator
 
Posts: 17077
Joined: Tue Jan 31, 2012 7:50 am


Return to Custom Stats, Reports and HUD Profiles

Who is online

Users browsing this forum: No registered users and 31 guests