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

Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!
New content is available in Academy! You may need to clear your browser cache for an optimal viewing experience

Challenge #106: How Long were the Lights On?

Asteroid

I used waaaaay too many formulae but I got there nevertheless

Alteryx Certified Partner

My solution :)

 

 

 

Spoiler
challenge_106.PNG
Asteroid

 

Spoiler
Capture.JPG
Nebula
Nebula

Love this - a "Gaps and Islands" challenge!

(the class of problems that deals with finding contiguous islands of data, or gaps)

 

Spoiler
i took a simple brute-force approach:
- generate 1 row per minute within the range
- Find unique
- count them

Gonna have a look at other solutions now for other ideas
Alteryx Certified Partner

Ha. I was stumped by a schoolboy error. Got there in the end.

 

Spoiler
I began by using DateTimeParse([Enter],"%I:%M %p") to convert both the Enter and Exit fields to a valid time format. I then used the "Generate Rows" tool to incrementally create each minute between the entry and exit times, and then fed this into a "Summarize" tool to count the distinct records. My logic was flawless, I was convinced, but then why was I getting more entries than the solution??

The equals sign. Remember not to double count the minute on exit! 
[Minutes]< [Exit_Time]

Once I noticed my schoolboy error, all was well.

Workflow.PNG
Results.PNG

That was more difficult than it needed to be. I need sleep.

Meteor

This one took me three tries to find a good flow, what a great challenge!

Meteor

my solution

Alteryx Certified Partner

My solution:

Spoiler
challenge_106.jpg
Highlighted
Alteryx Partner
Spoiler
Capture3.PNG

this one was very challenging!

 

Alteryx Certified Partner

Generate Rows is a go!!!

I don't think @NicoleJohnson realizes what an Alteryx beast she is!!!

 

Congrats on Inspire and thanks for the tip on the tool