community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

Three or more occurrances, either before 9 AM or after 6 PM, within a seven day period

Meteor

Hi gang,

 

I have a simple dataset with a requirement outlined in the subject.  Key fields in the data are userid, datetime, and a text field in which I am searching for a specific string.  I am thinking of grouping the users then feeding each user to a batch macro.  From there, I can filter by before  9AM or after 6PM.  What I am having trouble conceptualizing is within a 7 day period.  Any advice would be greatly appreciated.

 

Thank you,

 

~ Eric Marowitz

Alteryx Certified Partner
Alteryx Certified Partner

Hi @t-bone 

 

Could you please provide your workflow and a sample of your data?

 

This would help us to accomplish the task you want to do.


Cheers,

Alteryx Certified Partner
Alteryx Certified Partner

I don't actually think you would need a batch macro to perform this analysis, but without sample data it's really difficult to say.

 

Could you please share some sample data and an example output.

 

Ben

Meteor

@ BenMoss

 

I cannot transmit any of the actual data however it is structured like this:  The output I am looking for is on a successful hit (Three or more occurrences, either before 9 AM or after 6 PM, within a seven day period) write all 4 columns out to a text or excel file.  Thank you in advance!! ~ Eric

 

Field 1 (DateTime)   Field 2 (Text I am searching)  Field 3 (user id)   Field 4 (LogID)

 

Sample Data:

2019.01.03 15:22:18EST, House, 0001, 123456

2019.01.03 15:22:18EST, Dog, 0001, 123456

2019.01.03 15:22:18EST, House, 0001, 123456

2019.01.03 15:22:18EST, Cat, 0001, 123456

2019.01.03 15:22:18EST, House, 0002, 123456

 

Meteor

@ Thableaus

 

I cannot transmit any of the actual data however it is structured like this:  The output I am looking for is on a successful hit (Three or more occurrences, either before 9 AM or after 6 PM, within a seven day period) write all 4 columns out to a text or excel file.  Thank you in advance!! ~ Eric

 

Field 1 (DateTime)   Field 2 (Text I am searching)  Field 3 (user id)   Field 4 (LogID)

 

Sample Data:

2019.01.03 15:22:18EST, House, 0001, 123456

2019.01.03 15:22:18EST, Dog, 0001, 123456

2019.01.03 15:22:18EST, House, 0001, 123456

2019.01.03 15:22:18EST, Cat, 0001, 123456

2019.01.03 15:22:18EST, House, 0002, 123456

Alteryx Certified Partner
Alteryx Certified Partner

Hi @t-bone 

 

So the output of your sample data according to your rule would be this:

2019.01.03 15:22:18EST, House, 0001, 123456

 

Just this record. Right?

 

Cheers,

Meteor

Hey @Thableaus,

 

Thanks for looking at this for me - as far as output, I think they are looking for all 3 (or more) records that met the criteria of Three or more occurrances, either before 9 AM or after 6 PM, within a seven day period. 

 

Kind Regards,

 

~ Eric Marowitz

Alteryx Certified Partner
Alteryx Certified Partner

@t-bone 

 

Occurences of what? Which field? 

 

Please be more specific with an example of what an input would be and its respective output.

 

Cheers,

Bolide

In your sample data, each value for time is "15:22:18EST"

 

So none of the records seem to meet the condition "either before 9 AM or after 6 PM"

Meteor

@ChrisTX  - Thanks for the response.  You are correct.  None of the sample data meets the condition - I cant provide the actual data so I just mocked up the simple structure to give an idea.  I was hoping someone could walk me through an approach to solving this.  Fo example, I assume I have to put a filter for less than 9AM AND after 6PM.  I also am assuming that I have to set up a batch macro with the control workflow grouping by user ID then for each user, call and pass the UserID to the macro.  If this all sounds reasonable so far, what I am having a hard time wrapping my head around is "3 or more occurrences within a seven day period" - I guess I can write a formula and create a field with True or False for each occurrence - If contains("house") Then True Else False - If this all still sounds good, not sure how to check for "within a seven day period"  

 

Thank you!

 

~ Eric 

Labels