question

Mohsen Jamali avatar image
Mohsen Jamali asked

Playfab advanced query for VC

I want to get the virtual currency balance of a user as a chart shown in 4h timestamp bin. What is the advanced query for this?

Player Datadata
10 |1200

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

1 Answer

·
Neils Shi avatar image
Neils Shi answered

If you want to get the virtual currency balance of a user as a chart shown in 4h timestamp, you can refer to my testing query below. For more information about Data Explorer query, you can also refer to Getting started with Data Explorer advanced mode - PlayFab | Microsoft Learn.

 ['events.all']
 | where FullName_Name == 'player_virtual_currency_balance_changed'
 | where Entity_Id == 'enter the entity ID of the player you want to query'
 | where Timestamp > ago(4h)
 | extend CurrencyType = tostring(EventData.VirtualCurrencyName), Balance = toint(EventData.VirtualCurrencyBalance)
 | summarize Balance = sum(Balance) by Timestamp, CurrencyType
 | render timechart
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.