Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago
Solved

Calculate Previous Minute Values

Hi All,   I have a table which contains current and voltages values for each 3 minutes of intervel. I would like to calculate the previous minute value from the current minute value.   Sample da...
  • Phil_Seamark's avatar
    8 years ago

    Hi Anonymous

     

    Please try this

     

    Previous Value = 
    VAR pre = MAXX(FILTER(ALL(Sheet2),[Time]<EARLIER([Time])),[Time])
    RETURN 
    MINX(FILTER(Sheet2,Sheet2[Time]=pre && 'Sheet2'[Key] = EARLIER('Sheet2'[Key])),[VALUE])