The Altair Community is migrating to a new platform to provide a better experience for you. In preparation for the migration, the Altair Community is on read-only mode from October 28 - November 6, 2024. Technical support via cases will continue to work as is. For any urgent requests from Students/Faculty members, please submit the form linked here

Is there an operator to calculate the difference with its previous value?

c_cheec_chee Member Posts: 19 Maven
Is there an operator to calculate the difference with its previous value?

If the attribute has these values: [ 3, 7, 9, 6, 11 ]
Can we generate an attribute consisting of the differences of the two values? 
Like:   [ 4, 2 -3, 5]?

Best Answer

  • ceaperezceaperez Member Posts: 541 Unicorn
    Solution Accepted
    Hi @c_chee
    a quick way is using the Lag operator for Time series. with this operator you can create a new attribute with a Lag and then you can calculate the diffenrence between the attributes. 
    Other option is using the loop operators. 

    Best. 

    Cesar

Answers

  • c_cheec_chee Member Posts: 19 Maven
    Hi Ceaperez,

    Thanks for the answer. I'll have a look soon, but I'm sure it'll work.

    Clinton
Sign In or Register to comment.