none
SSRS Graph Horizontal Axis Value

    Question

  • Hi experts,

    I have this Table

     User | Time | Value

       A   |    2    |  100

       A   |    4    |   90

       A   |    6    |   80

       A   |    8    |   70

       A   |   10   |   80

       A   |   12   |   90

    I want this in Line Graph using SSRS as 'Time' in Horizontal Axis. But i want to limit the data output showing only 5 latest data. In table case, i only want 4,6,8,10,12 to show in graph and when a new data was entered it will show 6,8,10,12,14. 14 as the latest data. and one more thing i want to set 'Time' value to set auto increment by 2 and when it reach 22, it will go back to 0.

    Friday, November 22, 2013 6:38 AM

Answers

  • Hello,

    Based on my understanding, you want to display five Time values in the Horizontal Axis. When it reach 22, it will add a Time value 0 as the latest data.

    In order to meet your request, we can add a Time values parameter to get the specify values. Please refer to the steps below to work around the issue:
    1. Create another DataSet2 with only one field Time.
    2. Add a parameter ReportParameter1, configure with “Integer” Data type, “Allow multiple values”, and “Hidden” parameter visibility.
    3. Configure Available Values from DataSet2 and Time field. And the same values to set the Default Value.
    4. Add Time field in the Category Groups. Right click “Time”, select Category Group Properties.
    5. Click Filter in the left pane. Please refer to the below values:
    Expression: [Time]
    Operator: >
    Value: =IIF(Fields!Time.Value>0,ReportParameter1.Value(Count(Fields!Time.Value,”DataSet1”)-6),Nothing)
    6. Right click the X-Axis, select Horizontal Axis Properties. Select “Disable” below “Side margin”.
    (Note: We can set the “Interval” value to control the increment value.)

    Please refer to the screenshot below:

    Regards,
    Alisa Tang


    Alisa Tang
    TechNet Community Support

    Saturday, November 23, 2013 2:16 AM