SQL Server Performance

Working with Chart Data

Discussion in 'SQL Server Reporting Services' started by narcovi, May 19, 2004.

  1. narcovi New Member

    Is there any way to define the grouping of data in a series?

    Ex. (I have a table with data like this)

    Year - Month - Value
    2000 - Jan - 5
    2000 - Feb - 4
    2000 - Mar - 1
    2000 - Apr - 7
    2001 - Jan - 6
    2001 - Feb - 3
    2001 - Mar - 1
    2001 - Apr - 2
    2002 - Jan - 2
    2002 - Feb - 1
    2002 - Mar - 5
    2002 - Apr - 6

    ...and I would like the chart series to be as follows:

    ---------- Feb - Mar - Apr - Jan
    2000-2001 4 - 1 - 7 - 6
    2001-2002 3 - 1 - 2 - 2
    2002-2003 1 - 5 - 6 - <null>


    Thanks!
  2. narcovi New Member

    Nevermind... was much easier than it should've been.

    FYI - for anyone else who needs it --> Using a matrix, you just need the following expression in the row or column you're grouping data on:

    =iif(Fields!Year.Value<=2002, "2001-2002", iif(Fields!Year.Value<=2003, "2002-2003", iif(Fields!Year.Value<=2004, "2003-2004", "2004-2005")))

Share This Page