community
cancel
Showing results for 
Search instead for 
Did you mean: 
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Weekly Challenge
Do you have the skills to make it to the top? Subscribe to our weekly challenges. Try your best to solve the problem, share your solution, and see how others tackled the same problem. We share our answer too.
Unable to display your progress at this time. Please try again a little later, or contact an administrator if you continue to see this error.
Announcement | Get certified today - take the Alteryx Designer Core and Advanced exams on-demand now!

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
Aurora
Aurora

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 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