Matrix how to question

  • I have been playing with Reporting services for SQL Server 2000.

    I have a "how to" question.

    I have a report that contains two matrix based on two different

    datasets.

    The following is a made up example to show the problem:

    Matrix one has departments on the row and year on the column and say

    sales value as the data.

    Matrix two has reasons for refunds on the row and year on the column

    with again sales value as the data.

    What I want to do is have another thing say a matrix that shows the

    difference between matrix one and matrix two (ie subtracting the

    totals).

    How can I do this?

     

    Thanks, John

  • I think you should create a third dataset that does the calculations for you in the query.  Base the third matrix on that dataset.

    Kathi

    Aunt Kathi Data Platform MVP
    Author of Expert T-SQL Window Functions
    Simple-Talk Editor

  • Never Tried it, but I would guess that you could use expressions to do your calculations.  An expression Like:

    matrix1!txtSales.Value - matrix2!txtReturns.Value

    I would ptobably do what Kathi suggested but I'd like ot know if my suggestions work and may try it out.

  • Not quite what I had in mind. I meant that a third dataset should do calculations. Maybe your third dataset is based on a UNION query or a join.

    Aunt Kathi Data Platform MVP
    Author of Expert T-SQL Window Functions
    Simple-Talk Editor

Viewing 4 posts - 1 through 3 (of 3 total)

You must be logged in to reply to this topic. Login to reply