• Hi Luis

    Select WeekRange as WeekRange,

    [Open] as 'Open', [Resolved] as 'Resolved', [Pending] as 'Pending', [Other] as 'Other'

    From

    (

    Select weekRange, Year, Status from ##TempInteractionData

    ) As SourceTable

    Pivot

    (

    Count(Status) for Status in ([Open], [Resolved], [Pending], [Other])

    ) As PivotTable

    Order by year

    I did this. Now what happens is for a particular week when the year changes from 2013 to 2014 the data is displayed twice. The same will happen if i include month (which will also be necessary in the future).

    The data is displayed as follows:

    WeekRangeOpenResolvedPendingOther

    12/15 ~ 12/212230

    12/22 ~ 12/280210

    12/29 ~ 01/042010

    01/05 ~ 01/11173611

    01/12 ~ 01/182111911

    01/19 ~ 01/2583200

    12/29 ~ 01/041400