Solved

I want the number of unique events where event property is also unique. How do i find that?

  • 22 October 2021
  • 2 replies
  • 196 views

My use case is this. I need to measure unique logins to my system. User A has user id 100 and logins in via mobile in the morning and logins in via laptop in the evening. So there are 2 unique events now. However for both these unique events the event property (user id) is 100 only. So now I want to know events for unique event property. 

For example: - If user A with user id 100 logins in mobile and laptop and User B with user id 102 logins in with mobile and laptop - there are 4 unique login events.

However from my POV there are only 2 unique users only. 

Please explain to me, how to build a chart for this. Thank you

icon

Best answer by MikkoKarvonen 25 October 2021, 06:58

View original

2 replies

Userlevel 7
Badge +10

Hey @Sethuraman 

It really depends on how your app is instrumented here. Are you sending the log in events from both mobile and laptop system in the same project bucket and capturing/updating the platform property accordingly ?

If yes, then a simple event segmentation chart showing the uniques metrics for the log in event should work, like this one - https://analytics.amplitude.com/demo/chart/new/qk1qav3

In this chart, a user will be counted only once even if they have performed multiple log in events on the same day and you will be able to measure the unique logins in the selected time period.

Let me know if I have interpreted your use case correctly. 

Userlevel 5
Badge +2

My use case is this. I need to measure unique logins to my system. User A has user id 100 and logins in via mobile in the morning and logins in via laptop in the evening. So there are 2 unique events now. However for both these unique events the event property (user id) is 100 only. So now I want to know events for unique event property. 

For example: - If user A with user id 100 logins in mobile and laptop and User B with user id 102 logins in with mobile and laptop - there are 4 unique login events.

However from my POV there are only 2 unique users only. 

Please explain to me, how to build a chart for this. Thank you


I think custom formulas and specifically PROPCOUNT is what you are looking for: https://analytics.amplitude.com/demo/chart/new/gz5fore

This counts the number of unique values seen for the chosen event property, regardless of which user has sent them in.

Steps to take:

  1. Choose your event in the Event Segmentation view.
  2. Group the event by the event property you are interested in.
  3. Click on Formula button in the row of buttons above the graph.
  4. Enter formula PROPCOUNT(A) and click Apply.

However, I must add that the better approach would be to set the user id as UserId, instead of an event property. This way Amplitude would do this automatically when you use Uniques view in Event Segmentation.

Reply