Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
Anonymous
Not applicable

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

 

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@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)

View solution in original post

1 REPLY 1
amitchandak
Super User
Super User

@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)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors