Forum Discussion
hpatel24779
Helper II
1 year agocount Distinct customers per month
Hi, I have a table with customer id, service type, service start and service end. i also have a calendar table. i want to show per month in a graph, how many unique active users there were. i...
- 1 year ago
Great, if it works could you mark it as a solution for others to find please 🙂
SamWiseOwl
Super User
1 year agoHi hpatel24779
Unique people =
var currentdate = firstdate(calendar[date])
var finaldate = lastdate(calendar[date])
Return
Calculate( distinctcount(table[customer id]), table[startdate] <= Currentdate && ( table[enddate] >=finaldate || isblank(table[enddate]))
Capture the start and end date of the current month filter.
Filter the table to everyone whose start is before the earliest date and after the current date or blank.
- hpatel247791 year ago
Helper II
- SamWiseOwl1 year ago
Super User
Great, if it works could you mark it as a solution for others to find please 🙂