Forum Discussion

Excellove15's avatar
Excellove15
Iron Contributor
Oct 25, 2024
Solved

Create a dax to find time difference

Hi,   I have a requirement to create a dax for below data: we need to find the difference between setpoint temp column and current temp column: Then make sure that difference falls in...
  • Excellove15's avatar
    Oct 27, 2024

    Hi SergeiBaklan Sir,

     

    Just to update on the below, I have found a dax measure to find the difference between the setpoint temp and current temp.

     

    Delta = abs(AVERAGE(HeatSense_Device[SetPointTemp])-AVERAGE(HeatSense_Device[CurrentTemp]))

     

    My initial requirements mentioned above were :

    After finding the difference, make sure that difference(which is delta here) falls in range of > -1 and less than 1.

    If the above condition(-1<Delta<1) is met then 1(which means it meets the set point) else zero(not met the setpoint).

    Final & important thing, we need to count those that has not met the setpoint for more than 6 hours(Updatedon column).

    In simple terms, logic for this dax is 'Any that has not reached set point for more than 6+ hours'.

     

    PFA updated file here https://1drv.ms/u/c/cfada767f73d87ed/EahEMs0LOXpMrEu77yaYX3kBKdjbC6lM-6QfvDOzlTHtwg?e=9XqAbd

    I am struggling to find the above,please advise.

     

    Thanks in advance!

    SergeiBaklan 

Resources