Page 1 of 1

Report with cases

PostPosted: Sat Jan 07, 2023 11:56 am
by xpastorcitox
Hi, need to create a report that includes the amount of cases of a stat, it is possible? Or do I need to build a stat that give me the cases.

In that case, can you help me on what should I put into the new stat? Thanks

Re: Report with cases

PostPosted: Sat Jan 07, 2023 1:11 pm
by WhiteRider
I'm not sure what you mean by "cases of a stat". Can you explain further please?

Re: Report with cases

PostPosted: Sat Jan 07, 2023 1:33 pm
by xpastorcitox
For example, I have the stat of 3b. I want to know how many 3b opportunities the player have. The number that shows up when you put the mouse on the stat in the hud, for example 13/100. What I need is the sample, in this case 100. And I need that number either in a report, or in a new stat (in this case need help on how to do it. Hope it’s clear haha

Re: Report with cases

PostPosted: Sat Jan 07, 2023 3:31 pm
by WhiteRider
It is possible to do that, but you will need a custom stat.
Probably the simplest way is to make a copy of the stat that you're interested in, and change the format to display the times and opportunities as well as the percentage.

The Custom Stats Guide has an overview of custom stats in PT4, and the Tutorial: Custom Reports and Statistics goes into much more detail. The latter was written for PT3, but the same principals apply in PT4.

Search for "The format function" in this post for how to format expressions like that.

For "3Bet Preflop" for example, the format expression could look like:

format( '{1}% ({2}/{3})', ((cnt_p_3bet / cnt_p_3bet_opp) * 100, format_number(cnt_p_3bet,0,false,false), format_number((cnt_p_3bet_opp,0,false,false) )
..which would display as:
60% (12/20)

Alternatively, you could make a new stat which just displays the value of cnt_p_3bet_opp, but the above shows you the stat value as well as both the times and opportunities.