- Newest
- Most votes
- Most comments
you can achieve this by creating a couple of calculated fields and then using them in your visualization
Create a calculated field for current month's data:
Field Name: current_month_data
Formula:
ifelse(
month({logintime}) = month(now()) and year({logintime}) = year(now()),
1,
0
)
This calculated field will return 1 if the logintime is in the current month and 0 otherwise.
Create a calculated field for last month's data:
Field Name: last_month_data
Formula:
ifelse(
month({logintime}) = month(dateDiff(now(), 1, 'MM')) and year({logintime}) = year(dateDiff(now(), 1, 'MM')),
1,
0
)
This calculated field will return 1 if the logintime is in the last month and 0 otherwise.
Create a calculated field to identify new users:
Field Name: new_users
Formula:
ifelse(
sumOver({last_month_data}, [{login}], PRECEDING) = 0 and {current_month_data} = 1,
1,
0
)
This calculated field will return 1 if a user has not logged in during the last month but has logged in the current month, indicating that the user is new.
Finally, you can use the new_users calculated field in your visualization to show the net new users for the current month.
Relevant content
- asked 2 years ago
- AWS OFFICIALUpdated 3 years ago
- AWS OFFICIALUpdated 4 months ago
- AWS OFFICIALUpdated 8 months ago
- AWS OFFICIALUpdated 5 months ago
Not sure the new_users calculation logic will be equivalent to a left outer join or Minus