Skip to main content
Announcements
SYSTEM MAINTENANCE: Thurs., Sept. 19, 1 AM ET, Platform will be unavailable for approx. 60 minutes.
cancel
Showing results for 
Search instead for 
Did you mean: 
manojin123
Contributor III
Contributor III

count customer who call more than 5 time within 2 weeks

Hi Everyone,

Hope you guys help me on below issue.

 

I need to create a master measure which show the customer call more than 5 time in 14 days .

Here is the sample data

 

DtTm, ContactId ,CALLS
7/6/2021 12:55:31 PM ,1, 1
7/8/2021 11:13:17 AM 2 1
7/11/2021 2:13:48 PM 3 1
7/9/2021 1:39:33 PM 1 1
7/7/2021 12:05:02 PM 1 1
7/23/2021 12:56:04 PM 3 1
7/9/2021 3:30:30 PM 5 1
5/10/2021 3:30:30 PM 1 1
4/11/2021 3:30:30 PM 2 1
3/12/2021 3:30:30 PM 5 1
5/13/2021 3:30:30 PM 4 1
6/14/2021 3:30:30 PM 3 1
5/15/2021 3:30:30 PM 2 1
2/16/2021 3:30:30 PM 1 1
6/17/2021 3:30:30 PM 1 1
3/18/2021 3:30:30 PM 3 1

 

1 Solution

Accepted Solutions
Michael_K
Contributor II
Contributor II

Hi,

1. Add in the script a flag for every row:
if(Timestamp#(DtTm,'DD/MM/YYYY hh:mm')>=now()-14,1,0) as Is14Flag

2. Use set analysis with the new field:
=sum({<Is14Flag={1}>}CALLS)

 

Michael_K_0-1626952121531.png

 

View solution in original post

2 Replies
Michael_K
Contributor II
Contributor II

Hi,

1. Add in the script a flag for every row:
if(Timestamp#(DtTm,'DD/MM/YYYY hh:mm')>=now()-14,1,0) as Is14Flag

2. Use set analysis with the new field:
=sum({<Is14Flag={1}>}CALLS)

 

Michael_K_0-1626952121531.png

 

manojin123
Contributor III
Contributor III
Author

Thank you it worked