Home Forums Reporting Services Reporting Services Use a CTE to calculate running total instead of using the SSRS function? RE: Use a CTE to calculate running total instead of using the SSRS function?

  • Easy button! <CLICK!> Thanks, Jeff!

    For other poor noobs like me, here's at least the first part of the running total.

    SELECT ProtocolNo

    , WeekNumber

    , Goal

    , SUM(Goal) OVER (PARTITION BY ProtocolNo ORDER BY WeekNumber) AS CumulativeTotal

    FROM EnrollmentGoal;

    Now to add in the running total for Actual and then compare....

    Pieter