7 Replies Latest reply: Jun 1, 2016 3:51 AM by Luca V RSS

    Difference with previous value

    Luca V

      Hi,

      is it possible to calcolate at runtime the difference between values in a chart.

      For example, i have the next table data.

       

       

      PROGRESSIVE,TYPE,DEVICE,ENERGY

      1,1,a,1

      1,2,b,2

      1,3,c,3

      1,4,d,4

      2,1,a,5

      2,2,b,6

      2,3,c,7

      2,4,d,8

      3,1,a,9

      3,2,b,10

      3,3,c,11

      3,4,d,12

       

       

      In a chart i would like to set as DIMENSION "progressive" and "device"

      In the EXPRESSION  i would like something like  "ENERGY - previous(ENERGY)" to calculate the difference with the previous value:

       

       

      PROGRESSIVE "2" - DEVICE "a"  --->  5 - 1 = 4

      PROGRESSIVE "2" - DEVICE "b"  ---->  6 - 2  = 4

       

      ......

       

      PROGRESSIVE "3" - DEVICE "d"  ----->  12 - 8 = 4

       

      is it possible ?