SQL Server Performance

variance between two total columns

Discussion in 'SQL Server Reporting Services' started by Aaron Levin, Mar 17, 2004.

  1. Aaron Levin New Member

    I have a matrix in my report with two column groups, worktype and type. For evey worktype, there are three types- build, design, and overhead. I have a subtotal on types so that for each worktype I get a sum of the build, design , and overhead hours. I have three worktypes- supply, forecast, and actual. What I need to do is add two variance columns- one for forecast and one for actual. The value of the variance columns needs to be the total from worktype supply hours - forecast hours and supply hours - actual hours, respectively. Does anyone know how I can achieve this?

    Thanks,

    Aaron
  2. knarf New Member


    Had the same problem with percentage values on a report for sub/totals


    VarA , VarB, DiffA

    Create a new field called DiffA = ((Fields!MTD.VarA) - (Fields!PY_MTD.VarB))

    Place this field in on your table

    element Level =(Fields!PY_MTD.DiffA))

    Group/Total Level =Sum(Fields!PY_MTD.DiffA))


    Percentage =(Fields!PY_MTD.DiffA)) /(Fields!PY_MTD.VarB)) and set field format to 'P'

    Hope this helps






Share This Page