Forum Discussion
Inbound /Outbound Date difference calculation
- 4 years ago
So I'm not finished, but am getting close.
As you will see, I really need an answer to the duplicate timestamps.
These present a significant problem.
Scenario A = CASE ID 102
1) Create the following "Order" column.
It is imperative that this column groups by both [CASE ID] & [Direction].
The purpose of this column is to label in order (from 1 to N) the lowest timestamp to the highest timestamp within each grouping of CASE ID & Direction.
NOTE: In this case, I am isolating CASE ID 102 to simplify the example.
2) Create a new table called "Inbound" as follows, including only the Inbound rows.
NOTE: I renamed column "Created On" to "Date In".
3) Create a new table called "Outbound" as follows, including only the Outbound rows.
4) In the Inbound table, create the following columns:
- Date Out
NOTE: THIS IS WHERE THE MAGIC HAPPENS! WE'RE LINKING [Date In] TO [Date Out] BASED ON [Order]!
- Difference DateDiff (in minutes)
- Difference Operator (in HH:MM:SS)
NOTES: I provided Difference in 2 different ways. Use whichever you like.
Scenario B = CASE ID 101
- As you can see in Line 10 & 11, there are 2 identical rows for CASE 101 & Direction Outbound. As a result, both rows get assigned Order #2. For this reason, no Order #1 gets created for 101 Outbound, and therefore, cannot match up correctly with Order #1 for 101 Inbound. The end result, is incorrect matching & incorrect calculations.
- There is a similar problem with Line 4 & 6. There are 2 identical rows for CASE 101 & Direction Inbound. I don't understand how Order selected Row 6 as "Order 1" & Row 4 as "Order 2". But this really doesn't matter since we don't know which one should come first anyway. So it could be right or wrong, but we have no way to know.
Finally, as you can tell, I have also not yet programmed in the rule about [Date In] needing to be LESS THAN [Date Out] for it to be valid. If you get stuck on this one, let me know and I will come back to you.
Before worrying about that though, you either need to:
1) Remove identical duplicate rows (OR)
2) Clearly specify how to handle identical duplicate rows, if they are in fact, legitimate.
Hope what I have provided so far is helpful to you!
Regards,
Nathan
Thanks for your response. It's a relief to know there should be no duplicates!
So can you tell me exactly which Line #'s should be changed from AM to PM?
I will update my test data in the following screenshot accordingly.
Regards,
Nathan
Please Refer the New Screenshot for your reference
- karthickpbi4 years agoHelper I
CASE ID Transaction ID createdon sender Direction torecipients Sender Email domain Torecipient email domain Inbound Internal or External Outbound Internal or External Internal Email /External Email Expected Date 101 dfddfddfd-ft45f-45511-82rf4-drt534frt5 11-07-2022 04:44:41 PM [email protected] Outbound [email protected] @dell.com @rocketmail.com Internal External External Handled 101 16c957745d-c8fdfd-ecred11-8e2e5-00224fr821d3f0 07-07-2022 01:13:29 PM [email protected] Inbound [email protected] @dell.com @dell.com Internal Internal Internal Received 101 0e1cdfce42-00f08-esd11-s8d2e4-000d3a8fed3bdd23 20-07-2022 01:17:57 PM [email protected] Outbound [email protected] @dell.com @gmail.com Internal External External Handled 101 39063derf941-530drf7-edvfr11-82vgye5-000d3dera573c2f 19-07-2022 04:39:31 PM [email protected] Inbound [email protected] @dell.com @dell.com Internal Internal Internal Received 101 e1ar9f45f2-5g007-ed1d1-8se2e4-00dd0d3a573d94 19-07-2022 04:18:32 PM [email protected] Inbound [email protected] @dell.com @dell.com Internal Internal Internal Received 101 81edac04c-4fg07-edv11-82red4-000d3dra8d3bdd 19-07-2022 04:11:11 PM [email protected] Outbound [email protected] @dell.com @gmail.com Internal External External Handled 19-07-2022 15:52 101 ase4cdfbf-4c07-edd11-8c2e4-000d3asd573d94 19-07-2022 03:52:55 PM [email protected] Inbound [email protected] @gmail.com @dell.com External Internal External Received 101 b9d28f1f-4907-ed11-82ce4-000dd3a573c56 19-07-2022 03:27:05 PM [email protected] Inbound [email protected] @dell.com @dell.com Internal Internal Internal Received 101 d735sf60eb-46e07-eddd11-8dd2e4-000dssa3sdsda8d 19-07-2022 03:11:18 PM [email protected] Outbound [email protected] @dell.com @gmail.com Internal External External Handled 08-07-2022 13:56 101 baa8f7ba-4607-ed11-82e4-000d3a8d3bddsdsd 19-07-2022 03:09:49 PM [email protected] Outbound [email protected] @dell.com @dell.com Internal Internal Internal Handled 101 62d0sd43ba-c7fe-ec1sd1-82e5-002dsds248234364sds 08-07-2022 07:40:41 PM [email protected] Inbound [email protected] @dell.com @dell.com Internal Internal Internal Received 101 9413a6fesd1a-b1fe-sdsdx-82e5-002248sd23c208sd 08-07-2022 04:58:38 PM [email protected] Outbound [email protected] @dell.com @dell.com Internal Internal Internal Handled 101 39063derf941-530drf7-edvfr11-82vgye5-0ss00d3dera573c2f 08-07-2022 02:27:12 PM [email protected] Inbound [email protected] @gmail.com @dell.com External Internal External Received 101 e1ar9f45f2-5g007-ed1sed1-8se2e4-00dd0d3a573d95 08-07-2022 01:56:22 PM [email protected] Inbound [email protected] @gmail.com @dell.com External Internal External Received 101 81edsdac04c-4fdcg07-edv11-82red4-000d3dra8d3bdd 08-07-2022 01:46:24 PM [email protected] Outbound [email protected] @dell.com @gmail.com Internal External External Handled 08-07-2022 13:40 101 ase4cdfbf-4c07-ecsd11-8c2e4-000dsd3asd573d95 08-07-2022 01:40:49 PM [email protected] Inbound [email protected] @gmail.com @dell.com External Internal External Received 101 b9d28f1f-ss4907-ed11-82sce4-000dd3a573c57 08-07-2022 01:32:16 PM [email protected] Outbound [email protected] @dell.com @gmail.com Internal External External Handled 1023 d735sf60eb-46e07-eddd11-8dd2e4-000d3sdsda8d3bddsd 25-07-2022 05:16:07 PM [email protected] Outbound [email protected] @dell.com @aueuic.ch Internal External External Handled 1023 baa8f7ba-4607-ed11-82e4-serd34wd34 22-07-2022 03:03:52 PM [email protected] Inbound [email protected] @dell.com @dell.com Internal Internal Internal Received 1023 62d0sd43ba-c7fe-ec1sd1-82e5-002dsdswe345fcc248234365 19-07-2022 07:31:02 PM [email protected] Inbound [email protected] @dell.com @dell.com Internal Internal Internal Received 1023 9413a6fesd1a-b1fe-sdsdx-82e5-00sdertd248sd23c208sd 19-07-2022 06:43:55 PM [email protected] Outbound [email protected] @dell.com @dell.com Internal Internal Internal Handled 1023 39063derf941-530drf7-edvfr11-82vgye5-000d3dera573c2fser 15-07-2022 11:12:05 AM [email protected] Inbound [email protected] @dell.com @dell.com Internal Internal Internal Received 1023 e1ar9f45f2-5g007-ed1d1-8se2e4-00dd0d3a573seed96 15-07-2022 11:12:03 AM [email protected] Inbound [email protected] @dell.com @dell.com Internal Internal Internal Received 1023 81edac04c-4fgsdsd7-edv11-82red4-000d3dra8d3bdd 14-07-2022 06:00:41 PM [email protected] Outbound [email protected] @dell.com @dell.com Internal Internal Internal Handled 1023 ase4cdfbf-4c07-edd11-8c2e4-000d3asd57sed96t 08-07-2022 07:40:39 PM [email protected] Inbound [email protected] @dell.com @dell.com Internal Internal Internal Received 1023 b9d28f1f-4907-ed11-82ce4-000dd3a573c58serd 08-07-2022 06:39:07 PM [email protected] Outbound [email protected] @dell.com @dell.com Internal Internal Internal Handled 1023 d735sf60eb-46e07-eddd11-8dd2e4-000d3sdsda8d3ader1 07-07-2022 05:19:40 PM [email protected] Outbound [email protected] @dell.com @aueuic.ch Internal External External Handled 1023 baa8f7ba-4607-ed11-82e4-000d34frydhjj 07-07-2022 03:59:50 PM [email protected] Inbound [email protected] @aueuic.ch @dell.com External Internal External Received 07-07-2022 15:59 1023 62d0sd43ba-c7fe-ec1sd1-82e5-002dsds2482336cbju 07-07-2022 03:30:54 PM [email protected] Outbound [email protected] @dell.com @aueuic.ch Internal External External Handled - karthickpbi4 years agoHelper I
1. Here conversation between, Interl(Dell.com) and External(Gmail.com)/ Interl(Dell.com) and Interl(Dell.com). in this Case Inbound and outbound will not be consider conversation between with in Internal (DELL), so we need to Exclude Internal Conversation, Here i have Included Column Internal email/Excernal Email. filter Only External Received and External Handled. so that we will get only (Gmail.com)/ Interl(Dell.com) Conversation.
2. INBOUND : Will always send from [email protected] to [email protected](Dell.com)
3. Outbound : will always send from [email protected](Dell.com) to [email protected].
4.Note: In Inbound 90% will always Inbound sender Outbound of torecipient is same customer only (External(Gmail.com))
5. Inbound = customer sending (Sender)email to agent (to receipient)
6 Outbound = agent sending (sender) email to customer sending (to receipient)
- karthickpbi4 years agoHelper I
We need to follw same which you send earlier Screenshot for friday -screenshot , Highlited with Blue,yellow,... N/a