Forum Discussion

ALDOBES's avatar
ALDOBES
Frequent Visitor
3 years ago
Solved

DAX Calc Column - Pulling a date from a different table with different last value and match criteria

So this seems like it should be simple... but I've scrambled my brain so here goes for a first post. I have 2 Server DB tables (call them ref 2 like the below and ref 1 just containing account I...
  • v-jingzhang's avatar
    3 years ago

    Hi ALDOBES 

     

    You can create a calculated column with below DAX in "Ref 1" table. 

    Last Entry Created Date = 
    var _maxEntry = CALCULATE(MAX('Ref 2'[Entry ID]),'Ref 2'[AccountID]=EARLIER('Ref 1'[AccountID]))
    return
    CALCULATE(MAX('Ref 2'[Op Date]),'Ref 2'[Entry ID]=_maxEntry)

     

    Best Regards,
    Community Support Team _ Jing
    If this post helps, please Accept it as Solution to help other members find it.