question

rupinderkhatkar avatar image
rupinderkhatkar asked

last value on events

I need some help in trying to figure out how to capture a specific parameter (BossFoughtAmount) on this event (on_run_ended_by_winning) Basically each time this event triggers the value is not always correct, ie if the event triggers twice and BossFoughtAmount = 1 on the first event and 3 on the second event then this would represent that the player won on their first run, but then lost twice on the second event and won on the 3rd attempt. Would last value work well in identifying this?

support
2 comments
10 |1200

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

Xiao Zha avatar image Xiao Zha commented ·

Where do you want to capture specific parameters in the event, in CouldScript or DataExplorer? And what is the "last value"? Could you explain your scenario in more detail?

0 Likes 0 ·
rupinderkhatkar avatar image rupinderkhatkar commented ·

I wanted to capture this in data explore using Kusto. Last value in SQL refers to capturing the last value on a specific parameter/ event, but was trying to find the alternative for kusto e.g for every player who levelled up, what was the last level they were seen on before xx (we can use last value to capture it) So ideally in this scenario, I wanted to see each time this event was triggered (on_run_ended_by_winning) what was the value on parameter BossFoughtAmount.

I think I have captured the data as intended (saved as 'boss test' in basic explorer) - but not 100% sure the data is correct with over 1k users defeating the boss on their first attempt. Could you help me with the kusto side so I can check it is right?

0 Likes 0 ·
Xiao Zha avatar image
Xiao Zha answered

If you want to get the parameter BossFoughtAmount equa to 1 in DataExplorer to figure out how many player defeat the boss on their first attempt, you can refer to :

 ['events.all']
 |where FullName_Name ==" on_run_ended_by_winning "
 |where EventData["BossFoughtAmount"]==1
14 comments
10 |1200

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

rupinderkhatkar avatar image rupinderkhatkar commented ·

the above doesn't work, I tried this also but I get 0 players which is wrong as I have checked individual raw logs and seen some players who have fought the boss on their first attempt

['events.all'] |where FullName_Name == "on_run_ended_by_winning" | where Timestamp > ago(10d) |where EventData["BossFoughtAmount"]==1 | summarize Players=dcount(Entity_Id)

0 Likes 0 ·
Xiao Zha avatar image Xiao Zha rupinderkhatkar commented ·

The KQL sentence works fine in my test. And there is an incident: PlayFab Status - PlayStream Processing Delays may be related to your problem and the incident has been resolved. You may re-run the sentence to see if the issue still exists.

If the issue still exists, since the KQL sentence you provided means you want to check the players who have fought the boss on their first attempt within the last 10 days, you may first run : ['events.all'] |where FullName_Name == "on_run_ended_by_winning" | where Timestamp > ago(10d) to see if there have "on_run_ended_by_winning" events generated within the past 10 days, then you may also check the EventData of these events to see if there have “"BossFoughtAmount":1”in it.

0 Likes 0 ·
rupinderkhatkar avatar image rupinderkhatkar Xiao Zha commented ·

I tried again but receive an error 'no rows to show' I also ran the code sent to manually check a couple users in the last 10 days and if the bossFoughtAmount = 1 and there were a few there. I even tried the below and I am receiving 0 values across BossFoughtAmount 1-5, so something strange going on...

['events.all'] |where FullName_Name == "on_run_ended_by_winning" |where Timestamp > ago(10d) |where EventData["BossFoughtAmount"]==1 |summarize Players=dcount(Entity_Id)

0 Likes 0 ·
Show more comments
rupinderkhatkar avatar image
rupinderkhatkar answered

thank you very much, appreciate the support here

1 comment
10 |1200

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

Xiao Zha avatar image Xiao Zha commented ·

If you have any other questions, please feel free to post a new thread in the forum.

0 Likes 0 ·

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.