Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
7 years ago
Solved

Lookupvalue Problem

Hello Everyone,   I'm having a problem returning a result from a table using multiple criteria.   The tables I'm using are Cases and Workfront (which stores current project statuses).   I c...
  • Greg_Deckler's avatar
    Greg_Deckler
    7 years ago

    I think I understand what you are trying to do but it seems like your LOOKUPVALUE criteria is not specific enough to return a single value but rather multiple values. I suspect that you must have multiple lines in that other table, perhaps per status with a date assigned. If that is the case, you might try something like this instead:

     

    Column = 
    VAR __table = FILTER(ALL('Table2'),[Column] = [ID])
    VAR __max = MAXX(__table,[Date])
    VAR __status = MAXX(FILTER(__table,[Date]=__max),[LookupColumn])
    RETURN
    __status

    So, take the [ID] from your original table and FILTER ALL of the table to a matching column, now you have all rows in the 2nd table for that [ID]. Then, find the MAX date in that table of filtered rows. Finally, filter down to that exact date in the filtered row table and return the status that you are trying to grab ([LookupColumn]).

     

    Something along those lines.