Forum Discussion

rachaelwalker's avatar
rachaelwalker
Resolver III
4 years ago
Solved

Pulling Dates from another table with IF statement

I need help with a formula. I have two tables. My Quote table needs to pull the Expected_Close_Date from my Opportunity table based on matching Opportunity IDs. It has a one-to-many relationship beca...
  • Anonymous's avatar
    Anonymous
    4 years ago

    Hi rachaelwalker ,

    How about something like:

    Expected_Close_Date (in Quote Table) =
    VAR _Expected_Close_Date =
        LOOKUPVALUE (
            'Opportunity Table'[Expected_Close_Date],
            'Opportunity Table'[OppID], 'Quote Table'[OppID]
        )
    VAR _Result =
        IF (
            ISBLANK ( _Expected_Close_Date ),
            'Opportunity Table'[insert some date field here],
            _Expected_Close_Date
        )
    RETURN
        _Result