Challenge #106: How Long were the Lights On?
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
StevenBetts
8 - Asteroid
05-18-2018
02:01 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
mickael_gest
8 - Asteroid
05-25-2018
07:24 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
terry10
12 - Quasar
05-25-2018
08:33 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
17 - Castor
05-26-2018
06:42 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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
- generate 1 row per minute within the range
- Find unique
- count them
Gonna have a look at other solutions now for other ideas
17 - Castor
06-01-2018
02:33 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.


The equals sign. Remember not to double count the minute on exit!
[Minutes]< [Exit_Time]
Once I noticed my schoolboy error, all was well.
That was more difficult than it needed to be. I need sleep.
STate
7 - Meteor
06-01-2018
10:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
gauravk
7 - Meteor
06-02-2018
10:37 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Wouter
8 - Asteroid
06-06-2018
03:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
My solution:
LauraScavino
7 - Meteor
06-07-2018
02:56 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
JordyMicheal
11 - Bolide
06-08-2018
02:26 PM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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