Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
8 years ago

Compare values between two Dates

Hello All,

 

I have temperature data with intervels of 3 every minutes as below.

TimeTemperature
11:03:00AM23.03
11:06:00AM28.64
11:09:00AM29.32
11:12:00AM25.77
11:15:00AM24.71

 

Now i would like to compare each value with the previous value by the time.

 

I did it for the months by using Previousmonth function, but i couldnt find anything to calculate for previous minute values.

 

Can anyone please suggest me.

 

Thanks

Mohna V

5 Replies

  • Greg_Deckler's avatar
    Greg_Deckler
    Community Champion

    Try this:

     

    Column = 
    VAR previousTime = MAXX(FILTER(ALL(Temp),[Time]<EARLIER([Time])),[Time])
    RETURN MINX(FILTER(ALL(Temp),[Time]=previousTime),[Temperature])
    • Anonymous's avatar
      Anonymous
      Not applicable

      Thanks for the reply Greg_Deckler.

       

      Sorry that i didnt mentioend in question that i am using slicer called phases which is having three types B,R, and Y phases.

       

      When i used your query, it did worked for one phase that is B, when i filter it using slicer, but it is not with other two phases.

       

      But not with other two types. it is giving the b phase values only for rest of two types.

       

       

      Any help.

       

      Thanks,

      Mohan V

      • Stachu's avatar
        Stachu
        Community Champion

        How does the slicer link to the original data table?
        What is the syntax for VALUE?