Forum Discussion
Anonymous
8 years agoNot applicable
Count occurrences in a time interval
Hi everyone, Have been struggeling with this for a while so I have to ask if someone can help me. Been going through many forum threads but I can't get anything to work. I need to count the occu...
- Anonymous8 years ago
Try this and let me know if it works:
Count = VAR TwoWeeksafter = [Date] + 14 VAR TwoWeeksbefore = [Date] - 14 VAR PHtoCheck = [PhoneNumber] RETURN CALCULATE ( COUNTROWS (Table); ALL (Table); Table[PhoneNumber] = PHtoCheck; Table[Date] <= TwoWeeksFromDate; Table[Date] >= TwoWeeksbefore; )
Anonymous
8 years agoNot applicable
Try this and let me know if it works:
Count = VAR TwoWeeksafter = [Date] + 14 VAR TwoWeeksbefore = [Date] - 14 VAR PHtoCheck = [PhoneNumber] RETURN CALCULATE ( COUNTROWS (Table); ALL (Table); Table[PhoneNumber] = PHtoCheck; Table[Date] <= TwoWeeksFromDate; Table[Date] >= TwoWeeksbefore; )
LRiley
7 years agoFrequent Visitor
Hi Ross,
Maybe you can help I'm looking to use the same technique as above however using two tables the first table will have phone number and date then I need to use the same logic but getting the number of occurrences from the second table
Thanks in advance
Maybe you can help I'm looking to use the same technique as above however using two tables the first table will have phone number and date then I need to use the same logic but getting the number of occurrences from the second table
Thanks in advance