Forum Discussion

sivarajan21's avatar
sivarajan21
Icon for Post Prodigy rankPost Prodigy
1 year ago
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 range of > -1 and less than 1. If the above condition is met then 1(which means it meets the set point) else zero(not met the setpoint).

Finally 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 file here Heatsense.pbix

Please advise!

 

Thanks in advance!

marcorusso Greg_Deckler amitchandak Jihwan_Kim jgeddes 

9 Replies

  • Your sample data is pretty hot...  Looks like a sensor malfunction with buffer overflow.

     

     

    Note:  Your calendar has day level granularity. Your fact table has second level granularity. The join between them will not work.

     

      • lbendlin's avatar
        lbendlin
        Icon for Super User rankSuper User

        Add a date column to the fact table.

         

        I will  help you with the measure once you provide better sample data.