9 Replies Latest reply on Aug 11, 2017 2:31 PM by Tze Chiam

    How to select and display a value in dataset based on hour of day?

    Tze Chiam

      Hi, I have a simple dataset with 2 columns: column 1 is hour of day, and column 2 is coefficient values corresponding to each entry in column 1. I'd like to select and display the coefficient value based on the current hour of day, e.g., using:


      IF DATENAME('hour',NOW())= '11' THEN _____ END


      I'd like to know what should be the "_____" above so that it'll display 1.1 (based on the dataset) when the hour of day is 11.

      If there's another more elegant way that doesn't involve hard-coding the "='11'", that'd be even better.


      To give a little more context, there will be several values that will need to be obtained this way and the values will be plugged into a regression equation. The underlying dataset will be updated hourly and the dashboard/calculation will be refreshed hourly.




      Regards, Tze