Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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 ID | Date |
1 | 01-10-2021 |
1 | 03-10-2021 |
1 | 04-10-2021 |
1 | 01-11-2021 |
1 | 02-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?
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.
@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.
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
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
To learn more about Power BI, follow me on Twitter or subscribe on YouTube.
User | Count |
---|---|
93 | |
84 | |
78 | |
75 | |
66 |
User | Count |
---|---|
115 | |
105 | |
93 | |
65 | |
60 |