question

YONEKAWA Koshi avatar image
YONEKAWA Koshi asked

How to obtain statistics that are not rankings.

Hello.

For example

- Gender ratio of all players.

- Distribution volume of specific items.

- Ratio of character rolls of all players.

How can I get it?

Thank you.

Player Data
10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sarah Zhang avatar image
Sarah Zhang answered

PlayFab does not natively support statistics and analysis for specific player attributes. You need to calculate such “ratios” on your own. The PlayFab Statistics is still a recommended way to store such data.

For example, you can create a leaderboard whose name is “Gender”, use statistics value “0” to represent “Female”, use statistics value “1” to represent “Male”. Then you can load the entire leaderboard via API GetLeaderboard, calculate the gender ratio according to the ratio of “1” and “0”. You can obtain other ratios in similar ways.

Besides, we would suggest caching the "ratios" on clients or servers and update regularly to reduce the calls of GetLeaderboard.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

YONEKAWA Koshi avatar image
YONEKAWA Koshi answered

Thank you for answering.

10 |1200

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Write an Answer

Hint: Notify or tag a user in this post by typing @username.

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.