• John Mitchell-245523 (8/26/2016)


    There are pros and cons. Your query will return (possibly) unexpected results if there are gaps in the data or two dates in the same week. But yes, wrapping round year end is certainly something to take account of.

    John

    Yes, but your solution also has the same problem with gaps in data, so mentioning it specifically in the context of my query seems a bit disingenuous. I can also handle multiple dates in the same week fairly easily. The main point is that using a cyclic measure for your ordering is usually not the desired result, although there may be cases where it is.

    Drew

    J. Drew Allen
    Business Intelligence Analyst
    Philadelphia, PA