Lookup function

Tagged: ,

Viewing 3 posts - 1 through 3 (of 3 total)
  • Author
    Posts
  • #11837
    jimnoelak
    Participant

      It would be great if there was a lookup function of some sort.  For example, I have a continuous glucose monitor (CGM), which collects readings every 5 minutes.  Individual sensors are good for 14 days, and I have a shorter table listing each sensor, with the start/end dates during which the sensor was active.  I would like to add a column to the CGM table, which gets a sensor ID from the sensors table by finding the row whose active interval contains the CGM date/time.

      #11845
      dgteam
      Moderator

        It sounds like what might work for you is the Map column.

        If you set the Method to ‘Intervals,’ you can enter a look-up table directly in the Map column. Each senor’s begin and end date would be added in the DataGraph date format YYYY:MM:DD, with a comma separating them.

        Interval

        If you only have a few sensors, this should not be too hard to construct. To make it easier,  you could create the text for each line in the map column in the data table first.

        For example, if you have a table already that shows the dates, you can convert those in the data table to the DG date format.

        DGDateFormat

        Then you could use a Text expression column to composite the two dates into one field. That entry can then be copied to the clipboard to paste into the map look-up table. Right-click over an entry in the datatable to copy it to the clipboard.

        DGDateFormat2

        That said, if you had a long list of sensors, copying and pasting each range would be tedious. It seems like an excellent addition to the program would be to allow you to specify the begin and end interval, using columns in the data table.

        How many sensors do you have? Will this current suggestion work for your dataset?

        #11860
        jimnoelak
        Participant

          Thank you for your suggestions!  I have been using Map column, actually.  But I hadn’t thought of using a Text expression to get the range to paste into the lookup table, that helps quite a bit.

          I currently have 11 sensors, but the list is growing.  They’re added in as I use them, so this should be manageable using your suggestion.

          By the way, is there a way to get notifications (via email) when I get a response to a forum post?

          Thank you much.

        Viewing 3 posts - 1 through 3 (of 3 total)
        • You must be logged in to reply to this topic.