Ah, that's much easier!
I thought you wanted to see different values for each line in a report showing individual hands.
Assuming you're playing holdem cash: these stats will need to be in the Holdem Cash Player Statistics section. (If you're playing tournaments then the database fields will need "tourney_" at the start, and the stats will be in Holdem Tournament Player Statistics.)
See the
Tutorial: Custom Reports and Statistics for more information on building stats from expressions like those given below.
You can count the occurrences of cards using the database fields:
holdem_hand_player_detail.holecard_1 (your first hole card)
holdem_hand_player_detail.holecard_2 (your second hole card)
Full details of card values are available in
this post, but the individual card values run from 1 being the 2 of clubs through to 52 being the ace of spades, like this:
2c=1 / 2d=14 / 2h=27 / 2s=40
3c=2 / 3d=15 ...
4c=3
...
Ac=13 / Ad=26 / Ah=39 / As=52
So to check for the first hole card being any 2 you can use this:
holdem_hand_player_detail.holecard_1 % 13 = 1
To count the number of times that your first hole card was a 2 you would create a column with an expression like this:
cnt_hc1_twos =
sum( if[ holdem_hand_player_detail.holecard_1 % 13 = 1, 1, 0 ] )
Note: aces are holecard_1 % 13 = 0, but that will also be true if the holecard value is 0, which it will be if the hole cards are unknown. For your own hands that should never happen, but if you want to make sure unknown cards aren't counted you could include a check for "holdem_hand_player_detail.holecard_1 > 0".
To count cards of the same suit just check for ranges of hole card numbers. Clubs are 1-13, Diamonds are 14-26, Hearts are 27-39 and Spades are 40-52.
So:
cnt_hc1_clubs =
sum( if[ holdem_hand_player_detail.holecard_1 >= 1 AND holdem_hand_player_detail.holecard_1 <=13, 1, 0 ] )
The above examples are for each holecard separately, but you can combine them (since I assume you want the overall rather than individual result for holecard 1 and 2) by adding two IF statements inside the SUM.
For example, this column expression counts the number of club cards dealt as either card:
cnt_cards_clubs =
sum( if[ holdem_hand_player_detail.holecard_1 >= 1 AND holdem_hand_player_detail.holecard_1 <=13, 1, 0 ]
+ if[ holdem_hand_player_detail.holecard_2 >= 1 AND holdem_hand_player_detail.holecard_2 <=13, 1, 0 ] )
Note that each IF statement is exactly the same as given earlier, except that the second one uses holecard_2.
Once you have a column for each item that you want to count you can build a stat to display it. The stat to display the number of club cards would just have a value expression of:
cnt_cards_clubs
Use a Format Expression of:
/%.0f
..to display a number with no decimal places.
Fill in the rest of the info in the stat, including Title and Width on the Format tab and you're good to go.
If you want to divide by the number of cards dealt you'll need another column like:
cnt_cards_dealt =
sum( if[ holdem_hand_player_detail.holecard_1 > 0, 1, 0 ] + if[ holdem_hand_player_detail.holecard_2 > 0, 1, 0 ] )
..and then your stat's value expression would be:
cnt_cards_clubs / cnt_cards_dealt
..with a Format Expression of:
/%.2f
..for 2 decimal places.
These stats can be included in any report showing player stats, but not session based reports as those do not have access to information about individual hands, which we use here.
EDIT: I should also point out that you will need many more than 100 hands before you start to see statistically relevant data for this sort of thing.