Microsoft Azure PlayFab logo
    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Add-ons
    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA
  • Runs on PlayFab
  • Pricing
    • Blog
    • Forums
    • Contact us
  • Sign up
  • Sign in
  • Ask a question
  • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges
  • Home /
  • PlayStream /
avatar image
Question by ilyas · Apr 20, 2020 at 06:02 PM · dataanalytics

A simple query in Explorer

Hey guys, I have a custom event like this:

  {"PlayFabEnvironment": {
    "Application": "mainserver",
    "Vertical": "master",
    "Commit": "5ea788d",
    "Cloud": "main"
  },
  "EventNamespace": "title.61DAC",
  "EntityType": "player",
  "SourceType": "GameClient",
  "Timestamp": "2020-04-18T11:53:31.0308461Z",
  "EventName": "levelLog",
  "EntityId": "93E58E63E772BDE",
  "TitleId": "61DAC",
  "EventId": "6de7995f9644448e93fb3f6bf4b9045e",
  "Source": "61DAC",
  "player_id": "93E58E63E772BDE",

  "result": "win",
  "level": 3,
  "hero" : 2,
  "try_count": 5
}
If a player wins a level in the game, this event is sent to PlayFab.
I try to find the percentile 0.25 of try_count for each level and hero selected for this level where result is “win”.
The result will be like this, if we assume there are only 3 levels and 2 heroes in the game:
level hero try_count  

  1     1     1  
  2     1    2.5  
  3     1     8
  
  1     2     2  
  2     2    1.5    
  3     2     6
I tried my best but couldn’t get this query right. Could you please help me in this situation?Thanks in advance,Cagatay
Comment

People who like this

0 Show 0
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users

1 Reply

· Add your reply
  • Sort: 
avatar image
Best Answer

Answer by Citrus Yan · Apr 21, 2020 at 05:40 AM

There is no need to search for events where result is “win” since events are sent when player wins a level, we can assume that “levelLog” events always have “win” as the result. Therefore, according to your description, the following query should meet your requirements:

let data = 
['events.all'] 
| where FullName_Name == "levelLog" 
| project  toint(EventData.level) , toint(EventData.hero), toint(EventData.try_count);
data
| summarize  percentiles(EventData_try_count,25) by  EventData_level, EventData_hero
| project-rename  hero = EventData_hero, level = EventData_level, try_count = percentile_EventData_try_count_25
| sort by hero asc, level asc

By the way, you may find this Kusto Query Tutorial helpful for writing queries: https://docs.microsoft.com/en-us/azure/data-explorer/kusto/query/tutorial

Comment
ilyas

People who like this

1 Show 1 · Share
10 |1200 characters needed characters left characters exceeded
▼
  • Viewable by all users
  • Viewable by moderators
  • Viewable by moderators and the original poster
  • Advanced visibility
Viewable by all users
avatar image ilyas · May 20, 2020 at 03:19 PM 0
Share

Thanks you very much

Your answer

Hint: You can notify a user about this post by typing @username

Up to 2 attachments (including images) can be used with a maximum of 524.3 kB each and 1.0 MB total.

Navigation

Spaces
  • General Discussion
  • API and SDK Questions
  • Feature Requests
  • PlayStream
  • Bugs
  • Add-on Marketplace
  • LiveOps
  • Follow this Question

    Answers Answers and Comments

    2 People are following this question.

    avatar image avatar image

    Related Questions

    Will Event Export get all historical data or just data from the moment it is activated? 1 Answer

    Track game crashes with analytics. 1 Answer

    Can we use the new Playfab Data Explorer to query data exported to Azure Blob? 1 Answer

    Why do I not see all Playstream events in events.all? 1 Answer

    Viewing Playstream/Insight data with Tableau 1 Answer

    PlayFab

    • Multiplayer
    • LiveOps
    • Data & Analytics
    • Runs on PlayFab
    • Pricing

    Solutions

    • For Any Role

      • Engineer
      • Designer
      • Executive
      • Marketer
    • For Any Stage

      • Build
      • Improve
      • Grow
    • For Any Size

      • Solo
      • Indie
      • AAA

    Engineers

    • Documentation
    • Quickstarts
    • API Reference
    • SDKs
    • Usage Limits

    Resources

    • Forums
    • Contact us
    • Blog
    • Service Health
    • Terms of Service
    • Attribution

    Follow us

    • Facebook
    • Twitter
    • LinkedIn
    • YouTube
    • Sitemap
    • Contact Microsoft
    • Privacy & cookies
    • Terms of use
    • Trademarks
    • Safety & eco
    • About our ads
    • © Microsoft 2020
    • Anonymous
    • Sign in
    • Create
    • Ask a question
    • Create an article
    • Post an idea
    • Spaces
    • PlayStream
    • Feature Requests
    • Add-on Marketplace
    • Bugs
    • API and SDK Questions
    • General Discussion
    • LiveOps
    • Explore
    • Topics
    • Questions
    • Articles
    • Ideas
    • Users
    • Badges