Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Calculated column for repeated customers

Hi,

 

I'm having a bid of hard time figuring something out. I have a table with rows of customers id's who called to the office. Every customer ID is unique per customer, this data is combined with a date. 

 

I want to create a measure or calculated colmun that counts how many calls are repeated calls within one month without duplication of repeated calls. Is this possible?

 

For example: 

IDDATE OF CALLNUMBER of Repeated calls within one month before without duplication: 
11-1-20220
130-1-20221
112-2-20221
21-1-20220
215-1-20220
225-1-20222
31-1-20220
31-2-20220
31-3-20220

 

  • Anonymous , a new column

     

    new column =
    var _date = eomonth([DATE OF CALL],0)
    var _cnt = countx(filter(Table, [DATE OF CALL] <earlier([DATE OF CALL]) && eomonth([DATE OF CALL],0) = _date && [ID] =earlier([ID])),[ID])
    return
    if(Isblank(_cnt) ,0,1)

1 Reply

  • Anonymous , a new column

     

    new column =
    var _date = eomonth([DATE OF CALL],0)
    var _cnt = countx(filter(Table, [DATE OF CALL] <earlier([DATE OF CALL]) && eomonth([DATE OF CALL],0) = _date && [ID] =earlier([ID])),[ID])
    return
    if(Isblank(_cnt) ,0,1)