Rolling values

5 posts, 1 answers
  1. Scott Waye
    Scott Waye avatar
    111 posts
    Member since:
    Nov 2009

    Posted 12 Oct Link to this post

    Hi,  I want to add a rolling average to a graph as a line.  However it doesn't seem to be possible so I would be grateful for any help.  I have a graph with a category x axis of the month start date in the field settledDt, and I want to sum the last 3 months into a trend line.  Conceptually something like this:

     

    = RunningValue("graph2", Sum(Fields.settledDt >= AddNonths(-2, Max(Fields.settledDt)) ? Fields.initial_total : Null))

    What I'm trying to say here is if the month is within the last 3 in the RunningValue, then include initial_total in the sum, but of course this expression is invalid due to the nested aggregate.  My reports are all in trdx format with no code, so a no code solution is what I'd like.

     

    Thanks,

  2. Katia
    Admin
    Katia avatar
    303 posts

    Posted 14 Oct Link to this post

    Hi Scott,

    Trend lines are not supported by the Graph item out-of-the-box.

    To display the trend line, you will need to place additional LineSeries where the data for this series should be prepared manually.

    Feel free to log a feature request into our feedback portal where other community members can vote for it. New features are scheduled for development based on the demand from the community.


    Regards,
    Katia
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  3. DevCraft banner
  4. Scott Waye
    Scott Waye avatar
    111 posts
    Member since:
    Nov 2009

    Posted 14 Oct in reply to Katia Link to this post

    Thanks for the reply.  When you say "prepared manually" does that mean do it in the SQL?  Is it possible to include code in the trdx to do that?
  5. Answer
    Katia
    Admin
    Katia avatar
    303 posts

    Posted 14 Oct Link to this post

    Hello Scott,

    The data for the trend line needs to come pre-defined from your database as the Graph item currently does not support calculation of the data for the trend line.
    Depending on which type of data you use (SQL database, business object) you can add the required values so you can use them later for the trend series.


    Regards,
    Katia
    Telerik by Progress
    Do you want to have your say when we set our development plans? Do you want to know when a feature you care about is added or when a bug fixed? Explore the Telerik Feedback Portal and vote to affect the priority of the items
  6. Scott Waye
    Scott Waye avatar
    111 posts
    Member since:
    Nov 2009

    Posted 15 Oct in reply to Katia Link to this post

    Thanks,  I've added a feedback item as although it's possible to do in SQL , it typically requires doing a self join and doubling the work the DB server has to do. 
Back to Top
DevCraft banner