Get certified in Microsoft Fabric—for free! For a limited time, the Microsoft Fabric Community team will be offering free DP-600 exam vouchers. Prepare now
Hi,
Could you please help me to achieve the below scenario. it would be great if you could help on this Scenario.
Scenario: I need date difference between Inbound Created and Outbound Created date difference.
CASE ID | Created on | Direction | Expected Date (Date Difference between First Inbound Created date should be update in first Outbound ) |
101 | 01-08-2022 11:30:00 | Inbound | |
101 | 01-08-2022 11:00:00 | Outbound | |
101 | 01-08-2022 9:40:00 | Outbound | 01-08-2022 9:30:00 |
101 | 01-08-2022 9:30:00 | Inbound | |
101 | 01-08-2022 10:20:00 | Outbound | 01-08-2022 8:00:00 |
101 | 01-08-2022 9:30:00 | Inbound | |
101 | 01-08-2022 8:00:00 | Inbound | |
101 | 01-08-2022 7:20:00 | Outbound | |
101 | 01-08-2022 6:30:00 | Outbound | |
101 | 01-08-2022 6:00:00 | Outbound | |
101 | 01-08-2022 6:00:00 | Outbound | |
102 | 02-05-2022 6:00:00 | Outbound | 02-05-2022 4:55:00 |
102 | 02-05-2022 4:55:00 | Inbound | |
102 | 02-05-2022 3:40:00 | Outbound | 02-05-2022 2:00:00 |
102 | 02-05-2022 2:00:00 | Inbound | |
103 | 02-05-2022 6:00:00 | Outbound | |
104 | 02-05-2022 6:00:00 | Inbound |
Could you please help on this scenario.
Thanks In Advance.
Solved! Go to Solution.
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
My apologies. My attempts so far have been unsuccessful. Additionally, I have not had much time to continue investigation, and will have no bandwidth over the next couple weeks.
If someone else is able to provide a solution in the interim, then please do so. Otherwise, it might be some time before I can take this up again.
Regards,
Nathan
Hello @karthickpbi -
- The new dataset you provided on Saturday (Case ID's: 101 & 1023) is significantly different from the original dataset provided (Case ID's: 101, 102, 103, 104). Since there are new requirements based on the new columns in the new dataset, I am abandoning the original datset in favor of the new one.
- For readability (and for easier column reference in DAX), I have shortened and/or renamed columns as follows:
- "To Recipients" => "Recipient"
- "Sender Email domain" => "Sender Domain"
- "Torecipient email domain" => "Recipient Domain"
- "Inbound Internal or External" => "Inbound Type"
- "Outbound Internal or External" => "Outbound Type"
- "Internal Email / External Email" => "Process"
- Regarding your post with 6 points, I want to make sure I'm understanding correctly.
1. We want to:
- Exclude WHERE [Process] LIKE '%Internal%' (NOT highlighted below)
- Include WHERE [Process] IN ('External Received', 'External Handled')
- (highlighted yellow below)
- Result: We only keep Gmail.com / Dell.com conversation
- dell to gmail (highlighted orange)
- gmail to dell (highlighted blue)
- FINAL RESULT: We only keep the rows marked in green!
- Keep only Lines: 3, 6, 7, 9, 13-17
- Exclude all other lines.
- Lines 18, 27-29 have [Process] LIKE '%External%'. However, they are EXCLUDED because the conversation is NOT between dell.com & gmail.com.
- Am I understanding everything correctly so far? Please make any corrections.
2. "INBOUND : Will always send from chandra@gmail.com to xjdkdirfmff@dell.com(Dell.com)"
- I don't see either of these email addresses in the new dataset.
- So perhaps this is another way of saying the conversation is between
@gmail.com & @dell.com? But this is already stated in Point #1.
- So I'm ignoring Point #2.
- Correct me if I'm misunderstanding.
3. "Outbound : will always send from xjdkdirfmff@dell.com(Dell.com) to chandra@gmail.com."
- I'm ignoring Point #3 for the same reason as Point #2.
- Correct me if I'm misunderstanding.
4."Note: In Inbound 90% will always Inbound sender Outbound of torecipient is same customer only (External(Gmail.com))"
- My apologies. I'm not sure what this means.
- Are you simply saying that 90% of the time, the Sender Domain for external emails will be @gmail.com?
- There is no filter criteria for this point, correct? It's just an FYI, right?
5. "Inbound = customer sending (Sender)email to agent (to receipient)"
- There is no filter criteria for this point, correct? It's just an FYI, right?
6 Outbound = agent sending (sender) email to customer sending (to receipient)
- There is no filter criteria for this point, correct? It's just an FYI, right?
Again, please make any corrections to my understanding of new requirements, as needed.
Regards,
Nathan
You are correct.
conversation between 2 domains.
- we need to apply filter and exclude Internal convrsation bcz we are showing i the Report but Not considering the Date difference. we need to consider only for External Conversation.
Here We need to calculate date is.
EX:
we need to apply sort on created on and each case we have Multiple conversation right.
Each Inbound and outboud conversation , need to consider first Inbound and First outbound and then after that any outbound will notbe consider until net inbound.
again we have received one or More inbound.. after outbound , we need to consider first Inbound an dFirst Outbound, Like FIFO
My apologies. I have another priority I need to attend to today. I will return to this tomorrow.
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
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 | asdffsdfdsgdgdgg@dell.com | Outbound | yffyfuyfyufff@rocketmail.com | @dell.com | @rocketmail.com | Internal | External | External Handled | |
101 | 16c957745d-c8fdfd-ecred11-8e2e5-00224fr821d3f0 | 07-07-2022 01:13:29 PM | jthdddhdhh@dell.com | Inbound | asdffsdfdsgdgdgg@dell.com | @dell.com | @dell.com | Internal | Internal | Internal Received | |
101 | 0e1cdfce42-00f08-esd11-s8d2e4-000d3a8fed3bdd23 | 20-07-2022 01:17:57 PM | hfiuiugiugiug@dell.com | Outbound | Madhu@gmail.com | @dell.com | @gmail.com | Internal | External | External Handled | |
101 | 39063derf941-530drf7-edvfr11-82vgye5-000d3dera573c2f | 19-07-2022 04:39:31 PM | hpstore-europe@dell.com | Inbound | dhdhgdhhghdhgdg@dell.com | @dell.com | @dell.com | Internal | Internal | Internal Received | |
101 | e1ar9f45f2-5g007-ed1d1-8se2e4-00dd0d3a573d94 | 19-07-2022 04:18:32 PM | kgkggigg@dell.com | Inbound | jfjhjjjjjjfjjfjfjfjf@dell.com | @dell.com | @dell.com | Internal | Internal | Internal Received | |
101 | 81edac04c-4fg07-edv11-82red4-000d3dra8d3bdd | 19-07-2022 04:11:11 PM | ufiugogug@dell.com | Outbound | Madhu@gmail.com | @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 | Madhu@gmail.com | Inbound | ggfdgyyfjhhhg@dell.com | @gmail.com | @dell.com | External | Internal | External Received | |
101 | b9d28f1f-4907-ed11-82ce4-000dd3a573c56 | 19-07-2022 03:27:05 PM | uifigiuuiugdtdykugiuguu@dell.com | Inbound | gfhhfhjfhjff@dell.com | @dell.com | @dell.com | Internal | Internal | Internal Received | |
101 | d735sf60eb-46e07-eddd11-8dd2e4-000dssa3sdsda8d | 19-07-2022 03:11:18 PM | fgigkjhohohoihi@dell.com | Outbound | Madhu@gmail.com | @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 | hjfhjfffhjfhjfhjf@dell.com | Outbound | utiuuifiuigigiugi@dell.com | @dell.com | @dell.com | Internal | Internal | Internal Handled | |
101 | 62d0sd43ba-c7fe-ec1sd1-82e5-002dsds248234364sds | 08-07-2022 07:40:41 PM | kundservice@dell.com | Inbound | sestore.ggdytdt@dell.com | @dell.com | @dell.com | Internal | Internal | Internal Received | |
101 | 9413a6fesd1a-b1fe-sdsdx-82e5-002248sd23c208sd | 08-07-2022 04:58:38 PM | ytdtduudud@dell.com | Outbound | kundservice@dell.com | @dell.com | @dell.com | Internal | Internal | Internal Handled | |
101 | 39063derf941-530drf7-edvfr11-82vgye5-0ss00d3dera573c2f | 08-07-2022 02:27:12 PM | Madhu@gmail.com | Inbound | jkjahhdsad@dell.com | @gmail.com | @dell.com | External | Internal | External Received | |
101 | e1ar9f45f2-5g007-ed1sed1-8se2e4-00dd0d3a573d95 | 08-07-2022 01:56:22 PM | Madhu@gmail.com | Inbound | kincoidsfkdd@dell.com | @gmail.com | @dell.com | External | Internal | External Received | |
101 | 81edsdac04c-4fdcg07-edv11-82red4-000d3dra8d3bdd | 08-07-2022 01:46:24 PM | dhgfjfhjffhjfjhf@dell.com | Outbound | Madhu@gmail.com | @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 | Madhu@gmail.com | Inbound | ajsjhhhjdcc@dell.com | @gmail.com | @dell.com | External | Internal | External Received | |
101 | b9d28f1f-ss4907-ed11-82sce4-000dd3a573c57 | 08-07-2022 01:32:16 PM | fyufyfffyyfyfgghgh@dell.com | Outbound | shdsgsggdagdagdd@gmail.com | @dell.com | @gmail.com | Internal | External | External Handled | |
1023 | d735sf60eb-46e07-eddd11-8dd2e4-000d3sdsda8d3bddsd | 25-07-2022 05:16:07 PM | dhjfhjfjhggkkgkgkg@dell.com | Outbound | hjgshghsag@aueuic.ch | @dell.com | @aueuic.ch | Internal | External | External Handled | |
1023 | baa8f7ba-4607-ed11-82e4-serd34wd34 | 22-07-2022 03:03:52 PM | fffkgkiiihlcgfkgi@dell.com | Inbound | ksddsdgd@dell.com | @dell.com | @dell.com | Internal | Internal | Internal Received | |
1023 | 62d0sd43ba-c7fe-ec1sd1-82e5-002dsdswe345fcc248234365 | 19-07-2022 07:31:02 PM | cjutfchjfgfjfgufhfhjff@dell.com | Inbound | uagagsagsagsgd@dell.com | @dell.com | @dell.com | Internal | Internal | Internal Received | |
1023 | 9413a6fesd1a-b1fe-sdsdx-82e5-00sdertd248sd23c208sd | 19-07-2022 06:43:55 PM | gfhjkgggjjggjgkjg@dell.com | Outbound | ksggsggc@dell.com | @dell.com | @dell.com | Internal | Internal | Internal Handled | |
1023 | 39063derf941-530drf7-edvfr11-82vgye5-000d3dera573c2fser | 15-07-2022 11:12:05 AM | hgcgucchjcj@dell.com | Inbound | ufkccsccd@dell.com | @dell.com | @dell.com | Internal | Internal | Internal Received | |
1023 | e1ar9f45f2-5g007-ed1d1-8se2e4-00dd0d3a573seed96 | 15-07-2022 11:12:03 AM | fhjfhjff@dell.com | Inbound | uggcggg@dell.com | @dell.com | @dell.com | Internal | Internal | Internal Received | |
1023 | 81edac04c-4fgsdsd7-edv11-82red4-000d3dra8d3bdd | 14-07-2022 06:00:41 PM | dfhjhjkjjkjkjjillkk@dell.com | Outbound | ksckjccc@dell.com | @dell.com | @dell.com | Internal | Internal | Internal Handled | |
1023 | ase4cdfbf-4c07-edd11-8c2e4-000d3asd57sed96t | 08-07-2022 07:40:39 PM | fjffff@dell.com | Inbound | jdcjdsjcscdcds@dell.com | @dell.com | @dell.com | Internal | Internal | Internal Received | |
1023 | b9d28f1f-4907-ed11-82ce4-000dd3a573c58serd | 08-07-2022 06:39:07 PM | ggffj.hhjccccc@dell.com | Outbound | ddkd@dell.com | @dell.com | @dell.com | Internal | Internal | Internal Handled | |
1023 | d735sf60eb-46e07-eddd11-8dd2e4-000d3sdsda8d3ader1 | 07-07-2022 05:19:40 PM | ffdhgdjfjfhjfjfhjf@dell.com | Outbound | chandra@aueuic.ch | @dell.com | @aueuic.ch | Internal | External | External Handled | |
1023 | baa8f7ba-4607-ed11-82e4-000d34frydhjj | 07-07-2022 03:59:50 PM | chandra@aueuic.ch | Inbound | dfdfcefffefed@dell.com | @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 | igguguguguiug@dell.com | Outbound | dhcucyr@aueuic.ch | @dell.com | @aueuic.ch | Internal | External | External Handled |
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 chandra@gmail.com to xjdkdirfmff@dell.com(Dell.com)
3. Outbound : will always send from xjdkdirfmff@dell.com(Dell.com) to chandra@gmail.com.
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)
We need to follw same which you send earlier Screenshot for friday -screenshot , Highlited with Blue,yellow,... N/a
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 you @WinterMist
This is Not duplicate date its sequence date , while updating the date i have entered same date(typo mistake ).
Please reffer the data which i posted if needed. 08-06-2022 01:13 PM
Hi @WinterMist ,
There is No Duplicate Date in the Scenario screenshot, type Mistake i have updated date. Ex(1/8/2022 9:00:00 ), here i forget to update AM and PM .and In Case 101, date start with Am to PM and We don;t have any duplicate data in the Report. we alrays map first Inbound with Forst Outbound for each Transaction.
1 One Inbound and 3 Outbound, we need to consider first Inbound date and First Outbound Date.
Date We use Desc order and Latest Record will always come top for each and Every Cases.
I Hope This Will help you further.
Thanks
Thanks for your Helping,
solution is Very helpfulI, but need to understand fewthing Here, it would be greate, if you can connect.
Thanks,
Thanks for providing all this information. Very helpful.
- I now understand that we map the FIRST-IN with FIRST-OUT for a given case, provided that [FIRST-IN timestamp] < [FIRST-OUT timestamp].
- Is it also true that we map SECOND-IN with SECOND-OUT for the same case?
- And THIRD-IN with THIRD-OUT for the same case?
- And so on to infiniti within the same case?
Points 2 & 5 are a bit confusing to me.
2. Case 101, Line no 7,6, 5 - in this case 7& 6 are Inbound, so we need to
- map 7 Inbound with 5 line for Outbound. (First, you say to map 5 to 7.)
- so need to map with 6 to 7. (Then, you say to map 6 to 7. Is this a typo?)
5. Case 102, we have one Inbound and outbound, one inbound and one outbound , we need to map first inbiund and first outbound.
- I notice that no reference is made to mapping the SECOND-IN to SECOND-OUT here (within Case 102), even though it exists (and it was also done for Case 101 on lines 3 & 4). Is this intentional? For example, the FIRST pair I have labeled in the following screenshot as "Map 3". The SECOND pair I have labled as "Map 4". Should Line 12 & 13 be marked as "N/A" or a valid map pair?
One other thing confuses me as well. In Case 101, Line 4 & 6 both have an identical timestamp of 1/8/22 9:30.
So for this SECOND-IN + SECOND-OUT pairing, how do we tell DAX which line to choose for the pairing?
Finally, could you review the entire "Map" column I added for all data; checking every single row & making corrections as necessary?
Regards,
Nathan
we need to connect always first inbound with First outboundbased on case,
Example: one inbound after that 2 outbound , in this case we need to map with first inbound and first outbound.
-if we have one inbound and one outbound, we can map directly.
_ Case start with Outbound ,in this case will not be consider this,
- if we have inbound after that no Outbound , this will not be consider.
- if we have 3 inbounds continuously after that 2 outboud or one outbound or 3 outbound. will always map with fitst inbound and first outbound.
Hi @WinterMist,
Thanks for checking my request.
1. we need to map first inbound and First Out.
In Case No 101 and Line No 8,9,10,11 or Outbound before that No inbound for particular case ID , hence will not be consider.
2. Case 101, Line no 7,6, 5 - in this case 7& 6 are Inbound, so we need to map 7 Inbound with 5 line for Outbound. so need to map with 6 to 7.
3. Case 101, line no 4 we have one inbound and 3 have one outbound , so we need to map 4 and 3.
4. case 101, line 2 is outbound and 1 is Inbound after one No outbound and No record so will will not be consider.
5. Case 102, we have one Inbound and outbound, one inbound and one outbound , we need to map first inbiund and first outbound.
6. Case 103 - have one outbound , will not be consider
7. case 104 we have one inbound after thant we don't have outbound for particular case so ,will not be consider.
I Hope this clear your query.
Thank you.
Sorry. It's not clear to me which Inbound row matches which Outbound row.
- There are multiple Inbound rows on the same date. (1/8 & 2/5)
- There are multiple Outbound rows on the same date. (1/8 & 2/5)
How do I correctly identify the pairs of dates which go together?
Regards,
Nathan
Check out the October 2024 Power BI update to learn about new features.
Learn from experts, get hands-on experience, and win awesome prizes.
User | Count |
---|---|
33 | |
15 | |
14 | |
13 | |
9 |
User | Count |
---|---|
60 | |
23 | |
22 | |
19 | |
13 |