Basic GROUPBYBIN question

2 followers
0
Avatar

The documentation for GROUPBYBIN is pretty sketchy.  Here's my question.  I have a column with days-to-an-event, integers.  I want to bucket them into weeks-to-event, so I use groupbybin(@days-to-event;7).  The first category is labeled "0", the second, "7", etc.  It's actually hard to tell, but I think "0" means 0-6, "7" means 7-13, etc.  Am I correct?

Steve Bernstein

Official comment

  • Avatar
    Joel Stewart

    Steve, your assumptions are correct about the GROUPBYBIN function. The "7" designates the size of the buckets in the resulting groupings: 0-6, 7-13, 14-20, etc. 

    0

2 comments

  • Avatar
    Steve Bernstein

    BTW, ignore my weeks to event notion.  I'm really just trying to create a histogram with breaks at seven days.  Primarily this q is just to get clear on what groupbybin does.

    0
Please sign in to leave a comment.