PDA

View Full Version : Show Partypoints in Report



Enormo
11-11-2009, 07:40 PM
Hi!

I was searching for a custom stat which shows my earned PPs, but couldnt find anything - so i decided to 'write' it on my own. I dont have any experience regarding this matter, so i looked at some existing stats and transformed them to fit my needs. Now i am almost completely satisfied with the result, except the addition of the different points per limit. It seems like the sum of all limits in the report is not the actual sum but the avg of all limits - maybe someone has an idea to fix this..

My solution so far:




<Stat GroupName="Default" ColumnName="Partypoints" ValueExpressions="

(case when BigBlind = 4 then 58.0 else 0.0 end) +
(case when BigBlind = 10 then 38.0 else 0.0 end) +
(case when BigBlind = 25 then 10.0 else 0.0 end) +
(case when BigBlind = 50 then 6.7 else 0.0 end) +
(case when BigBlind = 100 then 4.0 else 0.0 end) +
(case when BigBlind = 200 then 2.5 else 0.0 end) +
(case when BigBlind = 400 then 1.7 else 0.0 end) +
(case when BigBlind = 600 then 1.4 else 0.0 end) +
(case when BigBlind = 1000 then 1.3 else 0.0 end) +
(case when BigBlind = 2000 then 1.1 else 0.0 end) +
(case when BigBlind = 3000 then 1.1 else 0.0 end) +
(case when BigBlind = 5000 then 0.7 else 0.0 end)
as PPfactor;

Sum(case when PKH.site_id = 0 then
(case when ph.RakeAmount > 0 then 1 else 0 end)
else 0 end) as RakedHands;"

Evaluate="(RakedHands/PPfactor)" ColumnHeader="Party Points" ColumnFormat="0.00" ColumnWidth="*" Tooltip="Party Points earned" />





I doublechecked the points shown in HEM and in the partyclient and they match almost perfectly (119.60PP vs 120PP yesterday for example).

The points are calculated correctly for PL/NL games - for FL or SNGs you have to edit the values.


Edit:

To show how it works (and to show the bug in the summary):

http://www.imgbox.de/users/public/images/n35406m178.png

Enormo
11-22-2009, 11:30 PM
I think i fixed the bug - new version:



<Stat GroupName="Default" ColumnName="Partypoints" ValueExpressions="

Sum(
(case when PKH.site_id = 0 then 1 else 0 end) *
(case when ph.RakeAmount > 0 then 1 else 0 end)*
(
(case when BigBlind = 4 then (1/58.0) else 0.0 end) +
(case when BigBlind = 10 then (1/38.0) else 0.0 end) +
(case when BigBlind = 25 then (1/10.0) else 0.0 end) +
(case when BigBlind = 50 then (1/6.7) else 0.0 end) +
(case when BigBlind = 100 then (1/4.0) else 0.0 end) +
(case when BigBlind = 200 then (1/2.5) else 0.0 end) +
(case when BigBlind = 400 then (1/1.7) else 0.0 end) +
(case when BigBlind = 600 then (1/1.4) else 0.0 end) +
(case when BigBlind = 1000 then (1/1.3) else 0.0 end) +
(case when BigBlind = 2000 then (1/1.1) else 0.0 end) +
(case when BigBlind = 3000 then (1/1.1) else 0.0 end) +
(case when BigBlind = 5000 then (1/0.7) else 0.0 end)
)
)
as ppoints"

Evaluate="ppoints" ColumnHeader="Party Points" ColumnFormat="0.00" ColumnWidth="*" Tooltip="Party Points earned" />


http://www.imgbox.de/users/public/images/d20841m178.png

Raven-2000
03-14-2011, 05:14 AM
it doesnt work anymore :(
are there some updates??

Enormo
03-21-2011, 10:29 PM
My actual customstats:


<Stat GroupName="Default" ColumnName="PartyPoints" ValueExpressions="Sum((case when PKH.site_id = 0 then 1 else 0 end) * ph.RakeAmount)/50.0 as ppoints"
Evaluate="ppoints" ColumnHeader="PartyPoints" ColumnFormat="0.00" ColumnWidth="*" Tooltip="PartyPoints earned" />


<Stat GroupName="Default" ColumnName="PartyPoints per 1000 hands" ValueExpressions="Sum((case when PKH.site_id = 0 then 1 else 0 end) * ph.RakeAmount)/50.0 as ppoints"
Evaluate="(ppoints*1000)/TotalHands" ColumnHeader="PartyPoints \nper 1k hands" ColumnFormat="0.00" ColumnWidth="*" Tooltip="PartyPoints per 1,000 played hands" />