Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Help - Data with initial event and final event on different rows

David-teryx
7 - Meteor

Hello, I have this example has initial event types like "Error" or "Alert" with final event types like "Error Fixed" or "Alert Fixed".  The Data have initial event and final event on different rows and always are in that sequence. For all Error event or Alert event there is a Fixed event before we can see another Error event.


I am trying to get the Date and the Time from the final events and insert that value on new columns, so I can have the inital event Date/Time and Final Date/Time on the same row to read the event in one single row.


There is no other data available to identify relation between initial and final event.

I appreciate any help, thank you.

 

RecordIDDescriptionTypeDateTimeError Fixed or Alert Fixed DATEError Fixed or Alert Fixed TIME
1Print OpenError Fixed10/2/202314:02  
2Print OpenError10/2/202314:02  
3Print OpenError Fixed10/2/202314:03  
4Print PausedAlert Fixed10/2/202314:03  
5Paper OutError10/2/202314:04  
6Printer PausedAlert10/2/202314:07  
7Print OpenError10/2/202314:08  
8Paper OutError Fixed10/2/202314:09  
9Print OpenError Fixed10/2/202314:11  
10Print PausedAlert Fixed10/2/202314:12  
11Tape OutError10/3/202318:03  
12Tape OutError Fixed10/3/202318:03  
10 REPLIES 10
Prometheus
12 - Quasar

@David-teryx I used the DateTimeParse expressions to turn your dates and times into actual dates and times then used conditional expressions to copy those values into the Error Fixed or Alert Fixed DATE and TIME fields. Is this what you're looking for?

Expressions.PNG

David-teryx
7 - Meteor

@Prometheus I am looking to get the Date and Time from an Error/Alert Fixed type event and write that to the previous existing Error/Alert type event.


Example in Bold and Italic:

RecordIDDescriptionTypeDateTimeError Fixed or Alert Fixed DATEError Fixed or Alert Fixed TIME
1Print OpenError Fixed10/2/202314:02  
2Print OpenError10/2/202314:0210/2/202314:03
3Print OpenError Fixed10/2/202314:03  
4Print PausedAlert Fixed10/2/202314:03  
5Paper OutError10/2/202314:0410/2/202314:09
6Printer PausedAlert10/2/202314:07  
7Print OpenError10/2/202314:08  
8Paper OutError Fixed10/2/202314:09  
Peachyco
11 - Bolide

Interesting.

 

I have one concern: Is it possible to have two or more cases of "Print Open" at the same time? Like this:

RecordIDDescriptionTypeDateTime
1Print OpenError10/2/202313:59
2Print OpenError10/2/202314:02
3Print OpenError Fixed10/2/202314:03

 

This is important because if we have a situation like this, it'll be very difficult to determine which of the two "Print Open" cases was fixed.

flying008
15 - Aurora

Hi, @David-teryx 

 

Another way for you refer:

 

录制_2023_10_05_15_47_31_778.gif

Input      
RecordIDDescriptionTypeDateTime  
1Print OpenError Fixed10/2/202314:02  
2Print OpenError10/2/202314:02  
3Print OpenError Fixed10/2/202314:03  
4Print PausedAlert Fixed10/2/202314:03  
5Paper OutError10/2/202314:04  
6Printer PausedAlert10/2/202314:07  
7Print OpenError10/2/202314:08  
8Paper OutError Fixed10/2/202314:09  
9Print OpenError Fixed10/2/202314:11  
10Print PausedAlert Fixed10/2/202314:12  
11Tape OutError10/3/202318:03  
12Tape OutError Fixed10/3/202318:03  
       
Output      
RecordIDDescriptionTypeDateTimeError Fixed or Alert Fixed DATEError Fixed or Alert Fixed TIME
1Print OpenError Fixed10/2/202314:02  
2Print OpenError10/2/202314:0210/2/202314:03
3Print OpenError Fixed10/2/202314:03  
4Print PausedAlert Fixed10/2/202314:03  
5Paper OutError10/2/202314:0410/2/202314:09
6Printer PausedAlert10/2/202314:07  
7Print OpenError10/2/202314:08  
8Paper OutError Fixed10/2/202314:09  
9Print OpenError Fixed10/2/202314:11  
10Print PausedAlert Fixed10/2/202314:12  
11Tape OutError10/3/202318:0310/3/202318:03
12Tape OutError Fixed10/3/202318:03  

 

******

How did you want process the event 'Alert Fixed' ? If you can upload more data for test , the logic will be clear up.

David-teryx
7 - Meteor

@Peachyco It could happen and every Print Open is fixed when at type column you get "Error Fixed". Always will be a Print Open Error and then a Print Open Error Fixed to have another Print Open Error.  

David-teryx
7 - Meteor

@flying008  looks like this is a good idea. Please share the Workflow file to see the way you did configure each tool to do that.

David-teryx
7 - Meteor

@Prometheus Thank you. This way the Date and Time was copied to the new columns on the same row. I am trying to get the Fixed event Date and Time and put it on the initial event fixed columns fro Date and Time.

David-teryx
7 - Meteor

@flying008  here is more data for this .
the event "Alert Fixed" is when the "Alert" event ends.  It is like for "Error" is "Error Fixed".

Please send me the workflow file you are using to be able to see how you configure the formula and tools . Thank you.

 

 

RecordIDDescriptionTypeDateTime
1Print OpenError Fixed10/2/202314:02
2Print OpenError10/2/202314:02
3Print OpenError Fixed10/2/202314:03
4Print PausedAlert Fixed10/2/202314:03
5Paper OutError10/2/202314:04
6Printer PausedAlert10/2/202314:07
7Print OpenError10/2/202314:08
8Paper OutError Fixed10/2/202314:09
9Print OpenError Fixed10/2/202314:11
10Print PausedAlert Fixed10/2/202314:12
11Tape OutError10/3/202318:03
12Tape OutError Fixed10/3/202318:03
13Tape OutError10/3/202318:04
14Print PausedAlert10/3/202318:05
15Print OpenError10/3/202318:06
16Print OpenError Fixed10/3/202318:06
17Tape OutError Fixed10/3/202318:09
18Print PausedAlert Fixed10/3/202318:10
19Cold Start MessageAlert10/3/202319:25
20Print PausedAlert10/3/202319:28
21Print PausedAlert Fixed10/3/202319:30
22Print OpenError10/3/202319:31
23Print PausedAlert10/3/202319:31
24Print OpenError Fixed10/3/202319:33
25Print PausedAlert Fixed10/3/202319:50
flying008
15 - Aurora

Hi, @David-teryx 

 

What result is your want ? like this is right ?

 

RecordIDDescriptionTypeDateTimeError Fixed or Alert Fixed DATEError Fixed or Alert Fixed TIME
1Print OpenError Fixed10/2/202314:02  
2Print OpenError10/2/202314:0210/2/202314:03
3Print OpenError Fixed10/2/202314:03  
4Print PausedAlert Fixed10/2/202314:03  
5Paper OutError10/2/202314:0410/2/202314:09
6Printer PausedAlert10/2/202314:07  
7Print OpenError10/2/202314:08  
8Paper OutError Fixed10/2/202314:09  
9Print OpenError Fixed10/2/202314:11  
10Print PausedAlert Fixed10/2/202314:12  
11Tape OutError10/3/202318:0310/3/202318:03
12Tape OutError Fixed10/3/202318:03  
13Tape OutError10/3/202318:0410/3/202318:06
14Print PausedAlert10/3/202318:05  
15Print OpenError10/3/202318:06  
16Print OpenError Fixed10/3/202318:06  
17Tape OutError Fixed10/3/202318:09  
18Print PausedAlert Fixed10/3/202318:10  
19Cold Start MessageAlert10/3/202319:25  
20Print PausedAlert10/3/202319:28  
21Print PausedAlert Fixed10/3/202319:30  
22Print OpenError10/3/202319:3110/3/202319:33
23Print PausedAlert10/3/202319:31  
24Print OpenError Fixed10/3/202319:33  
25Print PausedAlert Fixed10/3/202319:50  

 

******

Sorry, due to security policy restrictions, I am unable to upload workflow files, but please follow the tools I provided above, it is not complicated.

Labels
Top Solution Authors