Weekly Challenge

Solve the challenge, share your solution and summit the ranks of our Community!
IDEAS WANTED

We're actively looking for ideas on how to improve Weekly Challenges and would love to hear what you think!

Submit Feedback
We've recently made an accessibility improvement to the community and therefore posts without any content are no longer allowed. Please use the spoiler feature or add a short message in the message body in order to submit your weekly challenge.

Challenge #106: How Long were the Lights On?

Highlighted
Alteryx
Alteryx

I still haven't gotten the hang of these brute force row generation solutions. Haven't seen anyone do it quite the way I did, but I didn't check all 11 pages of solutions.

Spoiler
I scanned through the table and if the start time on an interval was less than the end time on the previous interval, then I set the start time to that end time to eliminate overlaps. Then did the difference and sum. But that is a lot more calculation than simple counting so I can see where the row generation solution could be faster.

 

Highlighted
Alteryx Certified Partner

Solution attached

 

Spoiler
106 Challenge.PNG
Highlighted
Alteryx Certified Partner

It was a dark and stormy nightIt was a dark and stormy nightWhen I tried to solve this, and it was getting to late.

So the logic to handle the overlap of the lights and people entering the room, was to tricky at that point.

 

But after a good nights sleep, I did nailed it, so here is my solution

 

Spoiler
First I used DateTime parse tool, to convert the Enter and Exit times to a real time object.

Then I sorted the new Enter and Exit times to make sure that they where in a correct order for the Multi-Row Formula tool.

That I used to group the Enter and Exit times so I could keep track of the overlapping persons entering at room, where the light was allready on (or nor leaving as the last person).

This was accomplished by grouping on the Room, and the newly created Group from the Multi-Row Formula tool, and the find the Min Enter time and the Max Enter time.

And finally calculating the minutes between the min and max times, and summarize it at the end.
2019-03-19 08_00_00-Alteryx Designer x64 - challenge_106_solution_verakso.yxmd_.png

I think I am getting better at this, since I did manage to solve this without peeking. I was close of doing that sometimes, but I kept myself for doing it, and in the end. I did manage to do it on my own,

 

Still Climbing

Thomas

 

 

 

Highlighted
8 - Asteroid
Spoiler
Capture.PNG
Highlighted
11 - Bolide
11 - Bolide
Spoiler
Challenge106.PNG
Need to get better at the in-built DateTime parsing options to use fewer tools at the front end.
Highlighted
8 - Asteroid

My solution attached.

Highlighted
6 - Meteoroid

Solution

Highlighted
8 - Asteroid

Not particularly elegant,  but I got the right answer.

Highlighted
9 - Comet

Was thinking along the lines of what @patrick_digan did. Thanks to his solution for getting me there.

 

Spoiler
106_Capture.PNG
Highlighted
Alteryx
Alteryx

My solution: