The ultimate Fabric, Power BI, SQL, and AI community-led learning event. Save €200 with code FABCOMM.
Get registeredEnhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.
Hello to all!
Relatively new to power bi and this problem is for sure beyond my knowledge skills so i'm going to need all the helpi can get.
So my model has two tables, a header (Calls_Header) and a detail table (Calls_details) connected with the call_id.
In the header i have general info regarding each call_id. That is:
call_id | a_number | c_number | call_date |
1111 | 2109980567 | 2109980567 | 6/8/2022 |
2222 | 2109980567 | 2109980567 | 6/6/2022 |
3333 | 2109980567 | 6977887799 | 6/6/2022 |
4444 | 2109980567 | 2109980567 | 6/6/2022 |
5555 | 2109980567 | 2109980567 | 6/4/2022 |
6666 | 2118899667 | 2118899667 | 5/30/2022 |
7777 | 2118899667 | 2118899667 | 5/29/2022 |
8888 | 6998899999 | 2118899667 | 5/26/2022 |
In the details table i have info regarding every step of the call in the call centre procedure. That is:
call_id | step_num | reason | call_date |
1111 | 1 | ask_balance | 6/8/2022 |
1111 | 2 | undefined | 6/8/2022 |
1111 | 3 | pay_bill | 6/8/2022 |
1111 | 4 | undefined | 6/8/2022 |
1111 | 5 | undefined | 6/8/2022 |
1111 | 6 | undefined | 6/8/2022 |
2222 | 1 | undefined | 6/6/2022 |
2222 | 2 | ask_balance | 6/6/2022 |
2222 | 3 | undefined | 6/6/2022 |
2222 | 4 | undefined | 6/6/2022 |
2222 | 5 | undefined | 6/6/2022 |
3333 | 1 | undefined | 6/6/2022 |
3333 | 2 | undefined | 6/6/2022 |
3333 | 3 | undefined | 6/6/2022 |
3333 | 4 | undefined | 6/6/2022 |
3333 | 5 | pay_bill | 6/6/2022 |
4444 | 1 | undefined | 6/6/2022 |
4444 | 2 | undefined | 6/6/2022 |
4444 | 3 | undefined | 6/6/2022 |
4444 | 4 | cancel_contract | 6/6/2022 |
5555 | 1 | ask_balance | 6/4/2022 |
5555 | 2 | undefined | 6/4/2022 |
5555 | 3 | pay_bill | 6/4/2022 |
5555 | 4 | undefined | 6/4/2022 |
6666 | 1 | ask_balance | 5/30/2022 |
6666 | 2 | undefined | 5/30/2022 |
6666 | 3 | pay_bill | 5/30/2022 |
6666 | 4 | undefined | 5/30/2022 |
6666 | 5 | undefined | 5/30/2022 |
6666 | 6 | undefined | 5/30/2022 |
7777 | 1 | undefined | 5/29/2022 |
7777 | 2 | ask_balance | 5/29/2022 |
7777 | 3 | pay_bill | 5/29/2022 |
7777 | 4 | undefined | 5/29/2022 |
7777 | 5 | undefined | 5/29/2022 |
8888 | 1 | undefined | 5/26/2022 |
8888 | 2 | ask_balance | 5/26/2022 |
8888 | 3 | undefined | 5/26/2022 |
8888 | 4 | undefined | 5/26/2022 |
8888 | 5 | undefined | 5/26/2022 |
What i want to achieve is to have a measure (don't know if that can be achieved by a calculated column as well in a way) that calculates:
The number of repeated calls when
"A call_id is considered repeated when it concerns the same c_number, has at least one common reason (besides the reason "undefined") and is within 3 days from another call_id.
And as this wasn't difficult enough they also want another measure but with a different definition of the repeated call
"A call_id is considered repeated when it concerns the same c_number and the same a_number, has at least one common reason (besides the reason "undefined") and is within 3 days from another call_id.
The below image may help you better understand what i want to achieve.
Appreciate all the help i can get and thank you all in advance.
Kostas,
PS: My role in the community doesn't allow me to upload pbix thus the tables and the images (that sucks Microsoft!)
Is it better thiw way?
User | Count |
---|---|
27 | |
12 | |
8 | |
8 | |
5 |
User | Count |
---|---|
31 | |
15 | |
12 | |
11 | |
7 |