Dashboard expression for 2 events happening in time period
Hello,
I've been struggling to get a dashboard expression to work correctly. I have daily data for customer visits to a website. In this data, I have a column called "UserFirstLogin" which has a value of 0 or 1 and indicates whether that day is the first day a user has logged in, and "UserInvited" which has a value of 0 or 1 and indicates whether that day is the day a user was invited to join the website.
What I'm trying to get is an indicator widget that will give a count of the number of users in the intersection between UserFirstLogin = 1 and UserInvited = 1 for any time period that the dashboard user filters by. So, for example, if they filter by the current month, I want the indicator to show the total number of users that have UserFirstLogin = 1 and UserInvited = 1 anywhere in that given month.
The expression I tried using was (COUNT(UserID), Filter: UserInvited = 1, Filter: UserFirstLogin = 1). Because the data is daily, though, this ends up only giving me the total number of users who were both invited and logged in on the same DAY in the month rather than for the entire time period that the dashboard user is filtering by. Any suggestions on how to accomplish something like this?
Hello mattmca ,
Check whether this formula gives you expected result:
sum([UserID], case when max([UserInvited]) = 1 and max([UserFirstLogin]) = 1 then 1 else 0 end)
-Hari