Jump to content
We've recently updated our Privacy Statement, available here ×
  • Running / rolling sum in a timeseries chart


    Friendly User
    • Features: Charts Product: Jaspersoft® Studio

    Situation:

    You want to display how some variable changed over time on a chart and therefore need to use rolling sum. The charts only show totals for the time period and not how overall totals change over time.


    Solution:

    To achieve this you will need to use the report variables instead. The timeseries chart will have a category (time), a series (some grouping criteria) and the measure that will be variable which we want to track.

    • We would need to first sort the dataset based on the category and series by creating two sort fields for these two fields.
    • Then create a group in a report. The group expression should be set to the field that is used in the chart series.
    • Now we will need to create a variable with desired calculation type (count, sum), increment type: none, reset type: group we created previously
    • Add the measure, set value expression to be $V{ourVariable}, calculation type: nothing

    See attached JRXML file for reference.

    timeseries.jrxml


    User Feedback

    Recommended Comments

    There are no comments to display.



    Guest
    This is now closed for further comments

×
×
  • Create New...