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

Count of phone number in table between two dates in the same table

I have a table that consists of the columns below

 

Call Date and Time    |    Phone Number   |

1-1-22 10:15:36               123-456-7890

1-1-22-10:18:23               256-435-9087

etc

etc

etc

 

The table spans millions of phone numbers and thousands of days.  I need to calculate the number of times each phone number appears in the table if the phone number calls back within 24 hours of the Call Data and Time.  

 

Any help would be terrific.  THANKS

2 REPLIES 2
Anonymous
Not applicable

Yalan Wu, 

 

Thank you for your response.  

 

I basically need to calculae the total number of times that a number repeats with the 48 hours after the original call date time.  

 

In the example below, the first instance is on 6-2-21 at 8:42 AM. There are three more instances within 48 hours giving us a total of 4. The second example occurs on 6-21-21 at 8:53 AM. There are two more occurances of this number after that date/time within the 48 hour window giving us a count of 3. In the next example, there is only 1 more occurance after the call date/time giving a count of 2, and finally in the last example, there is only 1 instance within the 48 hour window, giving a count of 1.  The instances are in RED

 

This metric only needs to look forward, not backward.  

 

CallDateTimeLocalRemotePhoneNumberNumber of calls within 48 Hours
6/2/21 6:54 AM4013333991
6/2/21 7:07 AM4016806041
6/2/21 7:14 AM4014147901
6/2/21 7:18 AM4017713231
6/2/21 7:24 AM4013096031
6/2/21 7:36 AM4017874331
6/2/21 8:05 AM4013658891
6/2/21 8:15 AM4012720611
6/2/21 8:16 AM4013900171
6/2/21 8:25 AM4012986711
6/2/21 8:31 AM4013013901
6/2/21 8:31 AM4016597231
6/2/21 8:35 AM6175796641
6/2/21 8:42 AM4014446874
6/2/21 8:53 AM4014446873
6/2/21 8:58 AM4017497631
6/2/21 9:04 AM4012731091
6/2/21 9:14 AM4015450891
6/3/21 8:08 AM5089737801
6/3/21 8:09 AM4014446872
6/3/21 8:09 AM4014709691
6/3/21 8:15 AM4014376571
6/3/21 8:16 AM4014812491
6/3/21 8:17 AM4014428851
6/3/21 8:22 AM4018713571
6/3/21 8:31 AM4014801361
6/3/21 8:44 AM5083360921
6/3/21 8:58 AM4012650201
6/3/21 9:13 AM4014446871
v-yalanwu-msft
Community Support
Community Support

Hi, @Anonymous ;

Can you provide some sample data in your tables (exclude sensitive data) with Text format and your expected result with backend logic and special examples.? I am not very clear for 24 hours according to the earliest time of each number or the daily 0:00-24:00 this time period;

Looking forward to your reply!

 
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

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.