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

Calling all Data Engineers! Fabric Data Engineer (Exam DP-700) live sessions are back! Starting October 16th. Sign up.

Reply
Anonymous
Not applicable

Count the frequency of multiple IDs within a date period.

I have some phone data and would like to find out how frequently a customer calls multiple times within 5 days.

 

Short background, we have noticed some customers are calling again very shortly after their original call, and now I need to find out of common this is. 

 

So if a customer calls 3 times in October and then calls 2 times again in November I would like the total count to be 5. 

Customer IDDate
101-10-2021
1

03-10-2021

104-10-2021
101-11-2021
102-11-2021

 

Is this even possible? The data is in an SQL server. I'm not an expert in Power Bi or SQL but is it perhaps easier to make this calculation with an SQL query? 

3 REPLIES 3
Anonymous
Not applicable

Hi @Anonymous ,

 

Both Mahoneypat and AllisonKennedy offer great advice, sample data without sensitive information and expected output would help tremendously.
Please see this post regarding: 

How to get your question answered quickly 

How to provide sample data in the Power BI Forum 

 

Hope it helps,


Community Support Team _ Caitlyn

If this post helps then please consider Accept it as the solution to help the other members find it more quickly.

AllisonKennedy
Super User
Super User

@Anonymous  Not sure yet what you want? Please describe further. The 5 is easy - just COUNTROWS(factTable) and put in a visual by Customer. Set a Date Range in filter or slicer visual. Then you can add DISTINCTCOUNT(CustomerID) to the same visual as the COUNTROWS(factTable) and you can get a tally of customers. Finally filter the visual for COUNTROWS(factTable) > 5 (or whatever value you wish).

 

However, if you want that rolling within 5 days, etc please further define your requirements, and if possible provide sample data and draw expected outcome in Excel sheet or pen and paper so we know what final numbers you expect.


Please @mention me in your reply if you want a response.

Copying DAX from this post? Click here for a hack to quickly replace it with your own table names

Has this post solved your problem? Please Accept as Solution so that others can find it quickly and to let the community know your problem has been solved.
If you found this post helpful, please give Kudos C

I work as a Microsoft trainer and consultant, specialising in Power BI and Power Query.
www.excelwithallison.com

mahoneypat
Microsoft Employee
Microsoft Employee

You should be able to use a measure that simply uses DISTINCTCOUNT( ) of your Date column to get the # of days each customer called.  Or just do a COUNT of the CustomerID column to get the total # of calls.  When you make visuals that include month, etc. you will get the # of calls in that time period.

 

Pat





Did I answer your question? Mark my post as a solution! Kudos are also appreciated!

To learn more about Power BI, follow me on Twitter or subscribe on YouTube.


@mahoneypa HoosierBI on YouTube


Helpful resources

Announcements
FabCon Global Hackathon Carousel

FabCon Global Hackathon

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

Check out the October 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.