Custom stats don't show (x/y)

Forum for users that want to write their own custom queries against the PT database either via the Structured Query Language (SQL) or using the PT3 custom stats/reports interface.

Moderator: Moderators

Custom stats don't show (x/y)

Postby mactracker » Tue Jul 05, 2011 9:40 pm

Hi

I'm trying to make a custom stat but I can't get it to show (x/y) values behind the percentages. I use this formula

(cnt_f_cbet_def_action_fold_out_of_pos/(cnt_f_cbet_def_action_fold_out_of_pos+cnt_f_cbet_def_action_call_out_of_pos+cnt_f_cbet_def_action_raise_out_of_pos)) * 100

with format expression /%.2f but I only get the percentages. I'm new to this so maybe there's a better way to code it. Thanks for you help! :)
mactracker
 
Posts: 30
Joined: Tue Jun 07, 2011 5:38 pm

Re: Custom stats don't show (x/y)

Postby WhiteRider » Wed Jul 06, 2011 3:31 am

To see the percentage you need to have the Value Expression in the exact format:

(a / b) * 100

Note that there is a space either side of the / and the * but not inside the brackets.
This should also work when a or b are built from multiple columns, but you'll still need to have the overall structure the same.
If you can't get it working please export your stat and attach it to a Support ticket and we'll check it out.
WhiteRider
Moderator
 
Posts: 54025
Joined: Sat Jan 19, 2008 7:06 pm
Location: UK


Return to Custom Stats, Reports, and SQL [Read Only]

Who is online

Users browsing this forum: No registered users and 0 guests