Expression

2 posts, 0 answers
  1. aswin
    aswin avatar
    1 posts
    Member since:
    Nov 2019

    Posted 28 Nov 2019 Link to this post

    Hi there,

    I am in the midst of designing a line chart where i need to calculate the difference between some of the fields of  the consequent rows. 

    For eg: The object data source have a field of datetime. I want to find the difference between the datetime of the first row data and the second row data.

    More like , = First(Fields.DateTime) - Second(Fields.DateTime) . Where the second means the next row or second row.

    I tried using PREVIOUS data function but it is not working in my telerik version. Unfortunately i cant find the correct expression to do this nor i can add a data field in the data level itself. Is there any expression to do this requirement  ? 

    Thanks in advance

     

        

  2. Neli
    Admin
    Neli avatar
    252 posts

    Posted 03 Dec 2019 Link to this post

    Hello Aswin,

    You may use the approach form the attached report where the difference of the dates is calculated as follows:

    = Fields.Date - Previous("detail", Fields.Date)

    Make sure that you use the Previous function with the right scope and expression.

    Regards,
    Neli
    Progress Telerik

    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
Back to Top